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)àClick “Finish”
Right click on Modelà Newà New Galleryà ADF Business Components à Business Components from Tablesà Create Database Connectionà Enter details
After connect to Scott enter Query and select the tables to create EO.
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”.
Right click on package and Click on New View Link to create a link Between two tables.
Name the VL as “MasterdetailbyVL”
Select the source and destination VO attribute that define the View Link.
Click on the checkbox of Source Accessor in view Link Properties wizard
Select the AM checkbox with enter the Package and Name as shown.
Create JSF Page
In Create JSF Page wizard type the File Name as MasterdetailbyVL.jspx and select as the Blank Page. click ok
From the Data Control drag and drop the XXSTPTestDetails2 to the JSF page editor. In Create Select the Master-Detailà ADF Master Table, Detail Table as shown.
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.