You dont really need 2 different view instances to switch between the LOVs. Check out the below links which describe conditional swithching of model driven LOVs for single attribute
No, i am using 2 instances for the same view object to use into 2 different pages.
each page will read lov from sql based view object but with different condition based on the page i am using
1 person found this helpful
Ok.. Lets say you have 2 LOVs namely LOV_MyAtt1 and LOV_MyAtt2.
In your 1st page drop your attribute as any single selection item (Eg: SelectOneChoice). Then go to its bindings, and look for your attribute. Click edit on bindings section which will take u to Model Driven List
Select the name of your LOV for page 1 (in this case LOV_MyAtt1) under Server List Binding Name drop down.
Follow the same for the second page too and select the other LOV name. That is it.
Is not there any solution in model side?
Any Ideas friends??
Other ideas, please??
any one have an idea?
I'm not sure to understand your case. You have a single VO with two LOV's associated to one attribute. And, you want change LOV depending on the page you are.
If is your case, you could create two View Criteria with two different conditions.
To create a View Criteria:
1. Open your VO. Select 'Query' element.
2. In the View Criteria section, click the Add button.
3. At the 'Create View Criteria' dialog, click the "Add Item" to specify the conditions to be observed in the LOV 1 ('nameVOCriteria1').
4. Repeat the first three steps to add a new 'View Criteria' with the conditions of the LOV2 ('nameVOCriteria2').
Then you have to assign the View Criteria to desired LOV:
1. In VO attributes, select the attribute you want to have LOV.
2. On the tab 'List of Values', select the LOV for editing.
3. En el diálogo 'Edit List of Values', pulsa el botón añadir del campo 'List Data Source'.
4. In the dialog 'Edit List of Values', press the add button of the 'List Data Source' field.
5. Repeat the first 4 steps and you add the VO in the list 'View Accessors' (nameVO2).
On the page that contains the 'LOV 1', automatically, it will execute the 'nameVOCriteria1'.
On the page that contains the 'LOV 2', automatically, it will execute the 'nameVOCriteria2'.