Tuesday 29 April 2014

ADF : How to implement dependent list of values

ADF : How to implement dependent list of values


Common requirement in ADF is to implement Dependent List of Values or Choice list. We can achieve this requirement in ADF bc. 

Business Requirement: Each employee should belong to a department and the future manager should also be from the selected department.

Technical Requirement: Restrict the Manager LOV to the current selected Department.

1. Create a View Object DepartmentVO 
















2. Create a View Object EmployeeVO 























3. Create a View Criteria for EmployeeVO








































4. Create a LOV for ManagerId under DepartmentVO











































5. Adding List DataSource & List Attribute to LOV_ManagerId (By Clicking on Add Symbol). 
Shuttle the EmployeeVO to View Accessor. Click on Edit to pass the parmeter to EmployeeVO1.




























6. Passing parameter to View Accessor on runtime by providing the parameter.



























7. Select EmployeeId as the list attribute 








































8. Adding UI Hints to the LOV.






































9. Attach the DepartmentVO to an Application Module. And test it using BC4J Tester.




























Happy Coding. :) 

No comments:

Post a Comment