Thursday, February 14, 2013

Dependent or Cascading List of Values (LOV) in ADF

I have built this sample on Regions, Countries and Locations table of HR Schema. In addition to it, I have created one more table TEST_RCL. This is the creation script for the same table:

create table TEST_RCL
  ID       NUMBER(3),
Now the main content. Create a view criteria in CountriesVO where you need to assign attribute RegionID to a bind parameter.

Similarly create a view criteria in LocationsVO too.

Now imagine the actual situation. User should see all the regions in the LOV. Once he/she selects a region, the Countries LOV should display the values related to the region selected in LOV.

So for Country attribute of TestRclVO, create a LOV.
1. Keep the data source to be the CountriesVO.

2. Click on Edit in the View Accessors screen, shuttle the view criteria from the list of available view criterias
3. Set the Value of the regid parameter to be 'Region'.

Follow the related steps for the LocationsVO. And then test the scenario in Model Tester.

Download the sample application from File Cabinet: DependentLOV.rar

No comments:

Post a Comment