We help IT Professionals succeed at work.

oracle jdeveloper adf question

grchap used Ask the Experts™
Oracle jdeveloper ADF question.
I have 2 tables
create table header1 (key number, headdesc varchar2(10))
create table detail1 (head_key number, sequence  number, detaildesc varchar2(10))

Want to create a screen where I can show all of these 5 fields (both header and detail)
and be able ADD/ UPDATE/ DELETE BOTH of  these tables simultaneously ?

How do I do it ?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
To get started try the following steps.

Within jdeveloper do the following

File menu-New-General category->Application.
then  Create Application - enter a name for  the application
in Application Package Prefix leave this blank and in Application Template choose No template
Enter model for the project name and then OK

Then you have to create a business component from tables (for your tables):
File-New- from Business Tier ADF business components and then business components from tables.

Then  for the UI from application navigator select your application next File menu -New-General category-Empty Project then name is something like view_...  and clikc ok
Next you will have to create a jsp page - select the view created in previous step and then File-New-Web tier- jsf in item click list JSF, JSP Click next - ok .
Whne you see the  Do Not Automatically Expose UI Components in a Managed Bean  be sure to check it.
You new jsp is now displayed. Drop a PanelPage component on the page and start your design.

From Data Contro Pallete select and drop on you page by selecting the option that will be displayed.

So you are almost there. Have to make your own changed/adjustments by seeing how thi whole process worked.


Thanks for the quick response, Georgeki.

Created Entity Objects  for header1 and detail1 and
created an association between header1 and detail on header1.key = detail1.head_key (1 to many)
then created a View Object combining both entities.

When I add the datacontrol of this View Object to the jspx page, all 5 fields show up and edit works fine.
It updates both tables at the same time nicely.

But when I click the "CreateInsert" button it only allows me to enter the 3 details fields
NOT the header fields(they show up but cannot be entered).
Do you know Why and how we can enter all the fields to create a new record in both header1 and detail1?
The CreateInsert you are pressing is used for the details part.

You have to add another for the Master part


Thanks for the quick response, Georgeki.

I did add CreateInsert for the master part. Now the insert takes place in both tables ok.

My screen is split into 2 parts.

The top one shows all the 5 fields of both master and detail in one row.(using a combined View obj.)
The bottom section shows these 5 fields in editable text boxes using the master view and detail view.
I have added the CreateInsert in this section only which works fine now.

Only problem I come across now is when I click on any row on the top section,
the bottom detail region do not show the corresponding fields of that  row.

Is there a listener I need to add to the top or something. How do I do that?
I do not cleary understand how your screen is setup. Can you attach a capture of your screen when it runs and load it here?


I uploaded it.

Typical master details examples are
It shows the dept in one region and shows the corresponding employees in another.

To relate my need with that example,
My need is to show BOTH dept and employees in both the regions.
i.e. Dept id, Dept Name , Employee name, Employee id..

We should be able to display in the top region all these fields from both tables
and the corresponding details show up in the
bottom region where you can insert/edit/delete BOTH the tables.

Check by creating an association in ADF Business components.