Wednesday 18 September 2013

ADF Tree table component

How to show the Master -child data in Tree structure in ADF.?

ADF provides one simple component by ADF Tree Table component, using this this component we can show the data in Tree structure.

Consider Employee Department relationship. We will show the list of employes for a department.

1) Create the view link between Department and employee, then you can see the viewlink AM Data Model.

First move the DepartmentVo to right side, and then move the View link under the DepartmentVo, it will look like below screen shot.



  
Now you can see this master-child relationship in the data-control.

2) Drag and drop the Deprtment table from the data-control to the jsff page as ADF Tree Table as shown below.

Once you drag and drop as ADF Tree Table, Add the Employee to the Department as shown below. At the beginning the Target Data Source is blank for both Department and Employee, we need to add the iterator into the bindings and then we need to add the Target Data Source.




3) Go to the Bindings and go to the Executables Add the iterator for the Child entity  ie Employee



4) Now go the bindings, edit the Department, and add the target Data Source using EL pIcker as shown in below image. Similarly add the Target Data Source for the Employee.



Now run the page and see the UI , you will see the Employee Name under each Department.





No comments:

Post a Comment