This may be a silly question but I haven't figured out the answer by myself, 
nor found any examples so please bear with me.

Say I have the following domain model: Department -* Employee.

I want to have a page that displays all departments, each with it's employees, 
and have a select button for each department *and* for each employee - on the 
same page. Something like this:


  | <ui:repeat value="#{departments}" var="dep">
  |    h:button action="#{bean.selectDepartment}" value="#{dep.name}"/>
  |    <ui:repeat value="#{department.employees}" var="emp">
  |       <h:button action="#{bean.selectEmployee}" value="#{emp.name}"/>
  |    </ui:repeat>
  | </ui:repeat>
  | 

So far my relevant backing bean code looks like this:


  | @DataModel
  | private List<Department> departments;
  | @DataModelSelection
  | private Department selectedDepartment;
  | @Factory
  | private void findDepartments() {
  |    departments = departmentDAO.getAll();
  | }
  | 
  | public String selectDepartment() {
  |    // do stuff with selectedDepartment
  | }
  | 
  | public String selectEmployee() {
  |   // ???
  | }
  | 

How do I build on this to add the select functionality for employees?

TIA

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

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


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to