Tuesday, May 15, 2012

How to add attribute from related entity in view object

Take as scenario where we need to retrieve the related objects attributes in the same result set. In this article, I'm trying to explain how can we add attribute from related entity in view object. 

In BC4J, this scenario can be implemented using Entity Objects facility provided in View Object layer. These entity objects are used by the view object for accessing the related objects attributes and will be exposed in data control layer automatically.

Implementation Steps

Create Fusion Web Application, click on ADF Business Components and create business components from table based on Departments, Employees.

Open the EmployeesView.xml view object and select the Entity Objects tab. Move the Departments entity from available pool to selected pool as shown below.


Go to the Attributes tab, click on add attribute from entity. In Attributes window under Departments entity section move DepartmentName from available pool to selected pool as shown below.


Run the ADF Module Tester(application module) and select EmployeesView1 in AppModule. Now we can notice DepartmentName attribute is also displayed for the employee result set.

No comments:

Post a Comment