A master-detail relationship is an association that reflects a primary-foreign key relationship between the database tables. The master is based on the table with the primary key, and the detail data block is based on the table with the foreign key. A master-detail relationship equates to the one-to-many relationship in the entity relationship diagram.
1. Click New Application, which open Create Fusion Web Application Wizard. Type Application Name as “MasterDetail” and select “Fusion Web Application (ADF)” option. Click finish creates Model and Viewcontroller architecture.
2. Connect to the database connection HR as shown.
3. Click on “Query” shows all the tables in HR database connection. Select Departments and Employees table and move them to the left side to Create EO.
4. Move list of already selected EO to the left side to create Updatable VO
5. Select the Application Module (AM) checkbox as shown. Click finish and Save all.
6. All the View links and Associations between tables created automatically as shown in Application Navigator and Run the AM to test the Data Model before it will create in web page.
7. Click on ViewController à Newà New Gallery àJSFà JSF Page. Click Ok
8. Type File Name “Master-Detail.jspx” and select Blank Page. Click Ok.
9. Drag and Drop the “Employees3” from the data control to editor and select
Master-Detail with “ADF Master Form and Detail Table” as shown.
Master-Detail in web browser.