الثلاثاء، 7 أبريل 2020

Dependent LOVs in Oracle ADF

Here, I am using the classic HR tables.

Objective: 
The objective is to create a dependency between Region and Country LOVs and a dependency between Country and Location LOVs.
This means, wen a Region is selected from the LOV, the Country list will be filtered for the selected Region.
Similarly, when a Country is selected, the list of Locations will be filtered for the selected Country.
The output will have a screen as below.
2
Step1: Add two attributes to the DepartmentsView as below.
3

Step2
:
 Assign LOVs of all three attributes as below.
4
5
6
Step3: Let’s create view criteria for the view objects(CountriesView and LocationsView).
CountriesView to be filtered based on Region
LocationsView to be filtered based on Country
Step4: Let’s update the accessors for LOVs in DepartmentsView with the view criteria created in Step3.
Step5: Update the properties of the attributes of DepartmentsView as below.
To set the dependency between Region and Country
Region(Auto Submit: True) Country(Dependency: RegionId)
To set the dependency between Country and Location
Country(Auto Submit: True) Location(Dependency: Country)
Now, we can run the ApplicationModule to verify the dependency among Region, Country and Location.
11

Step6
:
 Let’s drag DepartmentsView to the Page to create a Form
12.png

Step7
:
 To have the LOV dependency on the page, we need to do the below changes for the page items:

RegionId(Id: RegionId, AutoSubmit: true)
CountryId(Id: RegionId, AutoSubmit: true, Partial Trigger: RegionId)
LocationId(Id: LocationId, Partial Trigger: CountryId)
Time to run the page!!

ليست هناك تعليقات:

إرسال تعليق

ADF: Programmatic View Object Using Ref Cursor.

ADF: Programmatic View Object Using Ref Cursor. Posted by:  Manish Pandey   April 25, 2013   in  ADF   Leave a comment   3758 Views Sometime...