Oracle ADF Tips and Tricks
In this Oracle ADF Training Tutorial you will learn how to set up and display parent-child relationships between different components. In Oracle ADF 11g, you often need to display parent-child relationships between different components, such as tables and trees. In order to create those master-detail relationships, you need to first create a cascading model in the business component level. This is done by creating read-write or read-only view objects, establishing view links between them, then placing them inside the application navigator. Once a view object is in the application navigator, it will then be available as a data control.
When creating view objects through the Business Components wizard, JDeveloper will automatically detect any database foreign key relationships between view objects. If there is no referential rule on the database level, you can manually create the relationship by creating a view link. JDeveloper will ask you what the parent and child tables are, as well as the cardinality. For example, if you have an EMPLOYEE and DEPARTMENT table where each employee may or may not belong to a department, the parent table is DEPARTMENT, the child table is EMPLOYEE, and the cardinality is 0,1 -> *. In other words, each department may have 0 or more employees, and each employee may belong to 0 or 1 department.
In our Oracle ADF training class, we also discuss cascading view object relationships. Suppose you want to create a master-detail-detail – and so on relationship. After creating the necessary view objects and links between them, open the Application Module and go to the Data Model tab. Shuttle to the right the appropriate view objects, paying special attention to the indentation of the view objects. An indented view object means that it is a child. You may want to remove any view objects you don’t need by shuttling them to the left side, as well as giving each view object a more meaningful name to make ADF model development easier to manage. Be sure to refresh your Data Control window to see the most recent data model.
After learning how to create the business components concepts, ADF application development is a relatively easy process to understand.
Please Share This Knowledge With Others!
Hope you enjoyed this brief Oracle ADF Training Tutorial.