Master-Detail Page by View Link

We can create master-detail relationship between two tables using View Link (VL).

In this practice master table xxstp_test and xxstp_test_details as detail table created in Schema of database.

Click New Application àOpen Create Fusion Web application (ADF) wizardà

Select Fusion Web Application (ADF)àClickFinish

b12

3

Right click on Modelà Newà New Galleryà ADF Business Components à Business Components from Tablesà Create Database Connectionà Enter details

4

5

After connect to Scott enter Query and select the tables to create EO.

6

Shuffle the EO to the left to create VO. Do not select the read only VO. click on the checkbox of Application Module to create AM and click “finish”.

7

Right click on package and Click on New View Link to create a link Between two tables.

8

Name the VL as “MasterdetailbyVL”

9

Select the source and destination VO attribute that define the View Link.

10

Click on the checkbox of Source Accessor in view Link Properties wizard11

Select the AM checkbox with enter the Package and Name as shown.

12

Create JSF Page

In Create JSF Page wizard type the File Name as MasterdetailbyVL.jspx and select as the Blank Page. click ok

13

From the Data Control drag and drop the XXSTPTestDetails2 to the JSF page editor. In Create Select the Master-DetaiADF Master Table, Detail Table as shown.

14

Now Right click the JSF page and select “Run” to run the page in the browser the page behaves as Master-Detail relationship as shown.

When Master table data changes detail table data also changes as noticed.

15