1 Reply Latest reply on Oct 9, 2008 7:45 AM by Kashif Nazar

    a4j:commandButton in DataTable

    Julian Alejandro Newbie

      I have a a4j:commandButton into a column of dataTable. I want reRender the dataTable when the user press click over the button.
      The bean is working correctly; I does a system.out.println test and It works, but the dataTable not is reRenderized.
      What's up??

      <t:dataTable id="renderTable" value="#{orderBean.products}" var="item"
       styleClass="list" >
       <t:column width="80px">
       <f:facet name="header"><t:outputText value="Reference" /></f:facet>
       <t:outputText value="#{item.product.idProduct}" />
       <t:column width="75px">
       <f:facet name="header"><t:outputText value="Amount" /></f:facet>
       <t:outputText value="#{item.amount}" />
       <t:column width="330px">
       <f:facet name="header"><t:outputText value="Product" /></f:facet>
       <t:outputText value="#{item.product.name}" />
       <t:column width="90px" style="text-align:right;">
       <f:facet name="header"><t:outputText value="Cost" /></f:facet>
       <t:outputText value="#{item.price}" />
       <t:column width="70px" style="text-align:center;">
       <f:facet name="header"><t:outputText value=" X " /></f:facet>
       <a4j:commandButton value="delete" reRender="renderTable" action="#{orderBean.deleteProduct}">
       <f:param name="id" value="#{item.product.idProduct}" />
       <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" />

      I put ForceRender, but it still not works.

      I'm using:
      tomahawk 1.1.6
      RichFaces 3.2.1
      Tomcat 6.0