Master with Two Details on the Same Page

ADF makes it very easy to create a master detail page with one drag and drop operation from the data control palette onto the page.
But what if you want a master with 2 details on one page?

It's actually quite simple to achieve this - but I got asked this a couple of times last week so here goes...

All you need to do is drag the first detail over and drop it as a master->detail.

md1:

Then drag the second detail over and drop it as a table or a form - and now you have the three tables on the page and you are almost done.


But if you'll run your page now you'll find that your second detail is not refreshing when you are switching between the master records the way that your first detail does.
ADF did this synchronization part automatically for the first master-detail you dropped. All you are missing is a partial page rendering setting on your second detail.
See the difference between the two detail tables here:

md4:

md5:

So let's set it up - all you need to do is go to the form or table that contains your second detail and set its partialTrigger property to point to the master component.
(You can look at the setting for your first detail component and copy them).

Comments:

Shay, looks like you're using JDev 11g to do this. Does this also work with JDev 10.1.3.1? Thanks!

Posted by Gerald Winslow on June 04, 2008 at 10:01 AM PDT #

Yes this work with 10.1.3 also.

Posted by Shay Shmeltzer on June 04, 2008 at 11:31 AM PDT #

i sucessfully set partial setting as per you. parent form refresing child and when i click child record grandchild table refreshing ok. when create a record in parent -ok then i create new record - ok then i create record in grand child ok again i click on create record on child table ok. then i create record in grand child ok. but when i save i getting forign key error on grandchild table .. mentioning parent key not found. (in grand child primary key - parentid + childid+ grandchild) here parentid is missing in grandchild table. how to solve this problem or is there any sample or link. parent - adfform child - adftable grandchild - adftable

Posted by prafull on January 22, 2009 at 05:11 PM PST #

prafull, I think what you are running into is the order of posting entities to the database that is explained in the ADF Developer Guide: http://download.oracle.com/docs/html/B25947_01/bcadveo007.htm#CEGJAFCF

Posted by shay on January 23, 2009 at 02:06 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today