OAF Master – Detail Page

Share Button


OAF Master-Detail page will be covered in this tutorial. In order to make a master-detail OAF page, we need to use Association and View Link BC4J objects for keeping data integrity.

1. Run below sql in order to create tables, synonyms and sequences. Please pay attention to foreign key constraint between two tables. This constraint provides both data integrity and automatic generation of Association and View Link objects in JDeveloper.

2. Open a JDeveloper which has already prepared for initial setup. Right Click to your project and click New. Go To Business Tier-> ADF Business Componenets -> Business Components from Tables and click Ok button.

md_001 3.Organize your entity objects.md_002 4.Organize your view objects.md_003 5.Keep going without creating read-only view objects.md_004   6. Create application module and add your view objects into it.md_0057. Final structure for BC4J model:md_006 8. Right click to XxPlayersFkAssoc  association and click edit.md_007 9.In order to automatically set TeamId for child entity, there must be a composite relationship between master and detail entity objects. In order to do this, check composite association.

md_00810. Create a new OAF page with following steps.



md_011   11. Define a controller object for your page.md_012 12. Edit PageLayout Region properties:

ID Window Title Title AM Definition
PageLayoutRN  Master-Detail Page  Master-Detail Page  xxntc.oracle.apps.per.md.server.XxMdAM

13. Add two new region to page layout region and edit their properties with below information.


ID Item Style Text
MasterHdrRN header  Teams
ID Item Style Text
DetailHdrRN header  Players

14. Add a new region using wizard into MasterHdrRN.





md_017   15. Add a new region using wizard into DetailHdrRN .





md_02216. Add tableActions into XxPlayersEOVO2 table region.md_023 17. Add New Item to Region1 under table actions and edit item properties with below information.md_024

ID Item Style Prompt Action Type Event
AddPlayer  button  Add Player  firePartialAction  addPlayer

19. Add a new region into PageLayoutRN and edit properties with below information.

ID Region Style
PageButtonBarRN  pageButtonBar

20. Add a new item into PageButtonBarRN and edit properties.

ID Item Style Prompt
Apply  submitButton  Save

21. Create and Ovewwrite create methods for entity object java files XxPlayersEO and XxTeamsEO.


md_027   22. Make the following code changes.






23. Run the page and test it.md_028 24. Check the results.