action does not get executed after ajax reRender using a4j
evans Feb 4, 2009 7:47 PMHi, I have a simple category listing / product listing page. When I first load the page, only the categories display. Once I click on a category an Ajax call is made and reRenders the product listing portion of the page.I have a aj4 command on the products, however, when I click on them the action is not executed. I have read similar problems before but they involve not using a4j. I am using a4j on everything. Here is my xhtml. Please let me know what I am doing wrong or if this is a bug. The productAction.productAction execute works fine when used without ajax.
Thanks,
Evan
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" template="../layout/template.xhtml"> <ui:define name="topnav"> <ui:include src="../layout/menu.xhtml"> <ui:param name="page" value="home" /> </ui:include> </ui:define> <ui:define name="body"> <h:panelGrid columns="2" columnClasses="cols" width="100%"> <a4j:form ajaxSubmit="true" reRender="listing_body"> <rich:panel bodyClass="rich-laguna-panel-no-header" style="border-width: 0;"> <div id="leftNav"> <a4j:repeat var="_category" value="#{categoryList.resultList}" rendered="#{not empty categoryList.resultList}"> <h3> <a4j:commandLink action="#{productList.refresh()}" value="#{_category.shortDescription}"> <f:param id="CategoryId" name="catId" value="#{_category.categoryId}"/> </a4j:commandLink> </h3> </a4j:repeat> </div> </rich:panel> <rich:panel id="listing_body" bodyClass="rich-laguna-panel-no-header" style="border-width: 0; width : 1012px;"> <div> <a4j:repeat var="_product" value="#{productList.resultList}" rendered="#{not empty productList.resultList}" style=" width : 224px;"> <h3 align="center"> <a4j:commandLink action="#{productAction.productAction}" value="#{_product.shortDescription}"> <f:param id="ProductId" name="productId" value="#{_product.productId}"/> </a4j:commandLink> </h3> </a4j:repeat> <h3 align="center"> <h:outputText value="Welcome! Please pick a category from the left." rendered="#{empty productList.resultList}"></h:outputText> </h3> </div> </rich:panel> </a4j:form> </h:panelGrid> </ui:define> </ui:composition>