0 Replies Latest reply on Mar 8, 2011 4:43 PM by Sundeep Kadakia

    reRender in nested rich:datatable does not work

    Sundeep Kadakia Newbie

      I am using following stack:

           - JBoss 6.0 M2

           - Seam 2.2.1.CR1

           - RichFaces 3.3.3-CR1

           - mojarra-1.2_08-FCS

       

      Here is the facelet code snippet, all I would like to do is to refresh (or reRender) the order for which a new orderline has been added.

       

              <rich:dataTable id="tblId1" rows="10" var="order" value="#{orders}">   

                  <rich:column>

                      <h:form id="formId1">

                          <a4j:commandLink focus="newOrderline" ajaxSingle="true">

                              <h:outputText value="Add New Orderline"/>

                          </a4j:commandLink>

                          <a4j:outputPanel id="pTblId">

                                <rich:dataTable id="tblId2" var="line" value="#{order.orderlines}" rendered="#{order.orderlines.size() != 0}">                          

                                  <rich:column>                           

                                      <h:outputText value="#{line.title}"/>

                                  </rich:column>

                               </rich:dataTable>

                          </a4j:outputPanel>                   

                          <rich:panel>       

                              <h:inputText id="newOrderline" value="#{orderBB.orderLineTitle}" size="45"/>

                              <a4j:commandButton value="#{messages.addOrderline}" action="#{orderBB.createOrderLine}" reRender="tblIId1:0:formId1:pTblId"/>

                          </rich:panel>                                          

                      </h:form>               

                   </rich:column>

              </rich:dataTable>

       

      I tried both 'tblIId1:0:formId1:pTblId' and 'pTblId' as reRender value but it does not refresh to show newly added orderline title.

       

      Any thoughts or suggestions will be greatly appreciated.

       

      Thank you,

      Sundeep