0 Replies Latest reply on Nov 6, 2006 7:33 PM by forumer

    Showing nested objects in nested tables

    forumer

      I have following objects:


      AllManagers.java
      ArrayList managers;

      Manager.java
      String name;
      Arraylist employees;

      Employee.java
      String name;
      int yearsOfService;

      I'd like to be able to show one table, AllManagers, each row of which contains information about each manager - name and in the next cell a list of all his employees.

      So I started with

      <h:dataTable value=#{allManagers} var="manager">
      


      Then nested inside it

      <h:dataTable value="#{manager.employees}" var="employee">
      <h:column>
       <h:selectOneMenu readonly="true">
       <f:selectItems value="#{employee.name}" />
       </h:selectOneMenu>
      </h:column>
      


      for allManagers. The name shows up as expected. But the employees are not showing up!

      Is this the right way to handle such a situation? I'd appreciate any references or tips.

      Thanks