Let us use standard HR schema entities - Employees and Departments. The main trick is to add getter and setter methods into Employees entity bean for the departmentId (this will enable us to use departmentId in Employees entity). Below are main steps you need to follow when developing View layer:
- In the page definition file define methodAction for findAllDepartments. Define a methodIterator binded to findAllDepartments method definition and a table with two items - departmentId and departmentName
- Create af:selectOneChoice in af:column component as it is described in Steve Muench screencast
Sample application - SelectOneChoice.zip.
0 comments:
Post a Comment