Friday, April 20, 2012

How to Create Oracle ADF View Object based on Multiple ADF Entity Objects

Before getting started on creating VO based on multiple EO's , we need to do some steps.

1) Create Department EO under model.entity package (for any help : How to create ADF Entity Objects )

NOTE : People who are news to this post can download the Sample ADF Model Application from here ADF Model Sample Application and then can start from this post ..

While you create DepartmentsEO there will be two associations created automatically
1)DeptMgrFkAssoc
2)EmpDeptFkAssoc

This will be created because at database table level these are the foreign keys set and ADF will automatically recognize and will be created.


Now we are going to create VO that is based on DepartmentsEO and EmployeesEO

Step 1 :

Right Click on Model.View Package and select New View Object

Step 2 :

Create View Object dialog will open up and give the Name as EmptoDeptVO and Next


 














Step 3 :

Shuttle EmployeesEO and then DepartmentsEO from Available area to the right side. At the bottom the corresponding association will be selected and shown for the EO being selected  at Selected area . Just click Next

















Step 4 :

Shuttle all the attributes from available area to the Selected area and click Next .

















Step 5 :

Just click Next .
















Step 6 :















you can able to see the query that is formed out of two EO's we added .  you can edit the query by selecting expert from the Sql Mode drop down . Just click Next

Step 7 :

Click Next
















Step 8 :

Just Click Next
















Step 9:

Select Application Module check box and make sure the info u given is right as given in the screen shot.
Click Next and Next and Finish .

















Now your VO is ready . You can start testing by running the AM ( How to Run AM Step 6  )


No comments:

Post a Comment