3 Replies Latest reply on Feb 19, 2008 9:04 AM by h0ppy

    Problem with c:forEach and ric:dataTable

    bibinsga25

      Hi,
      I am using c:forEach and rich:table to iterate through a multi level data structure.But I am getting duplicate id exception every time I run this.But I am having a unique id for rich:table component.I tried changing the names,but still the same problem.In the same page itself I have two more data tables,where I doesnt use c:forEach,they will display the column headers initially when this page loads.But this one doesnt.Population of this datatable is made when I click on a list on the left side of the page.When I click this list it loads up with the data,but the next time when it tries to load the data, I am getting this duplicate id problem.
      The code for the rich:dataTable is given below

      <rich:panel id="cust-ext-details-panel">
       <f:facet name="header"><h:outputText value="Extraction Details"/></f:facet>
       <c:forEach items="#{customerSearch.currentCustomer.ftpFiles}" var="ftpFile">
       <c:forEach items="#{ftpFile.extFiles}" var="extFile">
       <rich:dataTable align="center" width="90%" value="#{extFile.extractions}" var="ext" id="ext_details_tab"
       onRowMouseOver="this.style.backgroundColor='#F8F8F8'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur">
       <rich:column>
       <f:facet name="header">Ftp File Name</f:facet>
       <h:outputText value="#{extFile.ftpFileName}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">File Name</f:facet>
       <h:outputText value="#{extFile.extFileName}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">Begin Date</f:facet>
       <h:outputText value="#{ext.beginDate}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">End Date</f:facet>
       <h:outputText value="#{ext.endDate}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">Unbillable</f:facet>
       <h:outputText value="#{ext.includeBillable}"/>
       </rich:column>
       </rich:dataTable>
       </c:forEach>
       </c:forEach>
       </rich:panel>
      



      Please help me with this issue.Thanks