1 Reply Latest reply on Mar 29, 2007 12:41 PM by gmanwani

    Seam DataModel related question...

    gmanwani

      I have to display a slightly complicated page which has a list containing a list and that containing a list etc...

      e.g. say you have a list of employees by dept..i.e. at the top level my backing bean returns a list of EmpDeptVOs and each item in the list (EmpDeptVO) is defined as

      EmpDeptVO {
       String dept;
       List<EmplVO>; {list of emp belonging to dept)
      }
      


      Now I have to loop through this list and render each EmpVO object which inturn contains lists like EmpDetails, EmpExperiences, EmpCertifications etc... which essentially would be rendered using h:dataTable.

      So my page is something like this
      
      <c:ForEach items="backingBean.empDeptVOList" var="empDeptVO " >
      
      <ul>
       #{empDeptVO.dept}
       <c:ForEach items="empDeptVO.empVOList" var="empVO " >
       <li>
       <h:dataTable value="#{empVO.details}" var="details">
       <t:column>
       <f:facet name="header">Emp Name</f:facet>
       <h:inputText value="#{details.name}"
       </t:column>
       </h:dataTable>
       <h:dataTable value="#{empVO.experiences}" var="experience">
       <t:column>
       <f:facet name="header">Emp Experience</f:facet>
       <h:inputText value="#{experience.value}"
       </t:column>
       </h:dataTable>
       </li>
       </<c:ForEach>
      </ul>
      
      </c:ForEach>
      
      


      My backing bean currently has the getEmpDeptVOList() and the setEmpDeptVOList().

      My first question is am I doing this right? What I would like to do is to be able to update each cell in the various data tables update independently using A4J and their respective value binding.

      Any ideas how could I make this work using Seam?