If we have a requirement to bind multiple LOV to single attribute in ADF View object then Oracle ADF BC has LOV switcher concept to achieve it.
I will use standard HR schema ,but on top of that I will create my own table to play with LOV Switch.
CREATE TABLE LOV_SWITCH (ID NUMBER(10) , LOV_RETURN_ID VARCHAR(20))
Here we are going to have two LOV one that will return department id and other that will return employee id on single attribute ID.
We have LOV_RETURN_ID field which will be check box for triggering the switch.
When I create EO/VO for LOV_SWITCH Table it generated following VO definition and I added extra transient attribute lovswitchvar.
Then you can see I added two LOV one will return employee id and other department id to ID attribute. Also , I selected List of Value Switcher as lovswitchvar.
LOV Definition can be found below.
If I run the application will it work ? NO
LovReturnId :- I made LovReturnId as check box and I am comparing value of LovReturnId in lovswitchervar ,if check box is clicked then use LOV_Id otherwise use LOV_Id1.
Now add groovy express to lovswitchvar.
Run Application Module tester.
When I click + icon first time to create row check box is unchecked.
UnCheck :- EmployeeId in LOV.
Check :- DepartmentId in LOV.
We have used LOV switcher in ADF BC layer , we can also used on Taskflow , Page Definition.