This content has been marked as final. Show 6 replies
You can try as add items in bean dynamically by viewing the inputtext value,Say user add 7 then add 7 items in bean to list and show .
is 7 the number of results to display in a LOV or is it an ID and all rows with this ID or below ID should be displayed. You need to be more detailed in your question
am not sure what exactly you are trying to achieve here,
but from your description, it looks like a query dependency to me..
So in your VO that will be used as the List of Values for the attribute you want, create a View Criteria that meets the requirement you want (seems like 'Less than or Equal To' is what you need).
So eventually, you will end up with a ViewCriteria and one bindVarialble in that LOV View Object.
Since you havent described your BC model, I can only assume that you have one main VO and both UI component are binded to attributes of that VO.
Now go back to your main VO and update the LOV View AcCessor to use the ViewCriteria specifying the proper value on the Bind Variable.
Hope this helps,
Like others have said above, more details would help to provide you more concrete response.
Howsoever, from your query yes, it is possible to create a dynamic view object with LOV. Check out the below link for more details
Good luck !
Edited by: 119413 on Feb 22, 2013 9:57 AM
I will explain the scenario again. There will be 3 components:
1. Inputtext component
2. a Submit button
3. One blank LOV (doesn't have any value)
Now the user will enter a value say 5 in the Inputtext component, and then press on Submit. And then the LOV will be showing values 1, 2, 3, 4, 5 in it.
If the user enters 7, then the LOV will be showing values 1, 2, 3, 4, 5, 6, 7 in it.
No, its not about index. Its like dynamically generating values and pushing into a blank LOV
Is that your requirement or just a sample scenario? If that is your exact requirement, then why do you want to go for VO, that is too much of a work. Rather, create a simple input Text component, and a selectOneChoice component with the selectItems bound to the List<SelectItem>. You can populate that list based on the button action and the value entered. No?
If this is just a sample scenario and you need to use VO to leverage the framework provided features for ViewObject, then check the Jobinesh blog (link in my previous comment).
Good luck !