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

    Seam DataModel related question...

    Girish M Newbie

      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 " >
       <c:ForEach items="empDeptVO.empVOList" var="empVO " >
       <h:dataTable value="#{empVO.details}" var="details">
       <f:facet name="header">Emp Name</f:facet>
       <h:inputText value="#{details.name}"
       <h:dataTable value="#{empVO.experiences}" var="experience">
       <f:facet name="header">Emp Experience</f:facet>
       <h:inputText value="#{experience.value}"

      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?