How to add one master and many details in Oracle ADF?

Friday, April 04, 2008

Oracle ADF helps you to define master detail regions by drag and drop. But 'drag and drop' is only possible for one master and one detail combination. For one master and many details design follow the following steps.

let us assume, you need one master and two detail.

Region Structure
---------------------------

Master1
|
|________ Detail1
|
|________ Detail2

View Objects
----------------------------
MasterVO
|
| VL1
|___________DetailVO1
|
| VL2
|___________DetailVO2


Step 1: Drag DetailVO1 from Data Control Palette.
Drop on the page design and select 'Master Detail => ADF master table, Detail Table'
This will create Master1 table and Detail1 table

Step 2: Drag DetailVO2 from Data Control Palette.
Drop on the page design and select 'Master Detail => ADF master table, Detail Table'
This will create Master2 table and Detail2 table

Step 3: Delete Master2 table

Step 4: Select Detail2 table. In the property inspector, Behavior tab, put Master1 in the Partial Triggers field. (Note: Master1 is the master table name).

Run the page and test.

  © Blogger templates Newspaper by Ourblogtemplates.com 2008

Back to TOP