[jboss-user] [JBoss Seam] - Seam DataModel related question...

gmanwani do-not-reply at jboss.com
Thu Mar 29 05:33:42 EDT 2007


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032676#4032676

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032676



More information about the jboss-user mailing list