Step:1 Create a New OAProject
Name the Default Package as xxtree.oracle.apps.fnd.treestr and click on next.

Now Connect to Database and Click on Next

Now attach Dbc file and give Username and Password of apps.

Step:2
Create AM
Right Click on Project—->New
Click on ADF Business Component and create a Application Module

Click Next till Step 4
Give the package name as xxtree.oracle.apps.fnd.treestr.server and specify your AM name and click next

Check on Generate java files and finish

Step:3
Now create View Object under xxtree.oracle.apps.fnd.treestr.server

Specify the View Object name and click on next till step 5
Enter the SQL Query Select * from xx_skills and click on next

Now check on Generate Java file and click finish to create the VO.

Now,Attach SkillVO to TreeStrAM
Shuffle the SkillVO to Data Model.

Step4:
Create a Page Right click on Project–>New–>OAComponents–>Page
Specify the page name and Package name as xxtree.oracle.apps.fnd.treestr.webui

In property inspector Set the AM Definition and Name the window title and title for the PageLayoutRN

Create a New Region of style Tree
MainRN–>TreeRN
the below structure will create after creating tree Region

Select the NodeDef1 and in the property inspector attach view instance and View attribute

Now attach View Instance and View Attribute for childNode1

Step:5
Now ,Create View Link under xxtree.oracle.apps.fnd.treestr.server
Specify the view link name and click next

Select the source attribute Childid and destination attribute as Parentid and click on next.

click Next

Now set the view link properties

Click on finish to Create the VL
Now attach the VL to childNode1 to View Link Accessor.
View Link Accessor :ChildIdSkillVO
Ancestor Node:/xxtree/oracle/apps/fnd/treestr/webui/TreeStructurePG.TreeRN

Step:6
In SkillVOImpl execute the query
Add the below Code.

Write Below Code in treeStrAMImpl

Step:7
Create a controller for the Page MainRN–>Set New Controller

Name the package as xxtree.oracle.apps.fnd.treestr.webui
class name as TreeStructureCO

Now call the method initTreeQuery written in AM in processRequest

Rebuild the Page and run the page

