6 Replies Latest reply on Feb 23, 2013 12:12 AM by 931325

    A dynamic View object at runtime

      Say there is an inputtext component and one LOV. User will enter a number, say 7, and then press a Submit button. And then in the LOV, user will be able to see the numbers from 1 to 7.

      Is it possible to achieve the same?
        • 1. Re: A dynamic View object at runtime
          Suresh Karunarathne
          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 .
          • 2. Re: A dynamic View object at runtime
            Frank Nimphius-Oracle

            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

            • 3. Re: A dynamic View object at runtime
              Dimitris Stasinopoulos

              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,
              • 4. Re: A dynamic View object at runtime
                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
                • 5. Re: A dynamic View object at runtime
                  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
                  • 6. Re: A dynamic View object at runtime
                    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 !