Oracle ADF allows you to easily create master-detail components easily using drag and drop features. Simply drag a child view object instance from the Data Control Palette and choose Master-Detail from the context menu. You have several ADF Faces components to choose from –any combination of master-detail forms and tables.
To implement master-child relationships with ADF Faces components, you need to first create these relationships on the ADF-BC (Business Components) layer. This is done by creating view objects and view links to form the relationship, then placing the corresponding view object instances into the Application Module to make them available as Data Controls. Creating Data Controls makes the ADF Business Components available in the view layer, which in this case is the ADF JSF web page.
However, creating a third level child – a second detail table involves a couple more steps. You will need to drag the view object instance from the Data Control Palette, place it anywhere on the JSF page, then set the child component’s PartialTriggers attribute to point to the parent’s id. For example, if the parent is a REGIONS view object and the child is a COUNTRIES object, set the ID attribute of the component representing the region to something easy to remember, such as “r1”, then set the PartialTriggers attribute of the “countries” component to “r1”. JDeveloper provides an expression editor to help you set this attribute. If the ADF Faces component lives in a container component such as a PanelHeader, you’ll need to precede the id with a colon. Obviously, this could become very complex, so the expression editor is an invaluable help.
When you run the ADF JSF page, whenever you select a record in a parent table, the child table will automatically update itself. This is known as “partial page rendering”, or PPR. Your JSF page will perform partial submits to the server instead of full round trips, saving a considerable amount of time for the end user. When Oracle’s documentation states that ADF Rich Faces has “over 150 Ajax-enabled components”, it simply means that these components have built-in PPR functionality. The developer only needs to edit the component properties to implement PPR.
You may create as many parent-child relationships as you want in a cascading fashion. For example: REGIONS -> COUNTRIES -> LOCATIONS -> DEPARTMENTS -> EMPLOYEES
This Oracle ADF training video tutorial will demonstrate how to create these levels of tables using partial page rendering (PPR).Please Share This Knowledge With Others!