0 Replies Latest reply on Nov 17, 2006 8:04 AM by Michael Schuetz

    Problem with nested dataTables

    Michael Schuetz Newbie

      Hi,

      I have a problem using nested dataTables. Following code does not work correctly:


      
       <h:dataTable value="#{companies}" var="aCompany"
       rendered="#{companies.rowCount > 0 }" binding="#{contracts}">
       <h:column>
       <f:facet name="header">
       <h:outputText value="Unternehmen" />
       </f:facet>
       <h:outputText value="#{aCompany.name}" />
       </h:column>
       <h:column>
       <f:facet name="header">
       <h:outputText value="Bereiche" />
       </f:facet>
       <h:dataTable value="#{aCompany.contracts}" var="aContract">
       <h:column>
       <h:outputText value="#{aContract}" />
       </h:column>
       </h:dataTable>
       </h:column>
       <h:column>
       <h:commandButton action="#{manager.bla}" value="Bearbeiten" />
       </h:column>
       </h:dataTable>
      


      Bean:
      @DataModel
       private ArrayList<CompanyEntity> companies;
      
       @DataModelSelection
       private CompanyEntity selectedCompany;
      
      


      The Error
      /user/showAllCompanies.xhtml @38,51 value="#{aContract.scope}": Bean: org.hibernate.collection.PersistentSet, property: scope


      What i get is a list of contractEntititis but not the each Entity.

      When Is assign the second dataTable an own Model, everything works fine - but it does not work in teh above example, because all is dynamically generated.

      I have neither find anything about that in the documentation nor in the examples.

      Do you have an idea?