4 Replies Latest reply: Feb 21, 2012 4:35 AM by B.Delmée RSS

    select lists default value (page item)

    B.Delmée
      I am probably missing something obvious here, but select list on a page are correctly displayed (using the underlying static llist or query), and the default value (static while testing) is displayed, yet it seems that on the very first invocation, the page items are not known on the server-side. Hence report/graph regions that use the items as parameters return 'no data found'. If I submit all works as expected (either through a button, an item change or merely by clicking the tab that displays this page for a 2d time). How do I ensure that the value initially displayed/selected is actually set a the page scope as well?
        • 1. Re: select lists default value (page item)
          fac586
          bdelmee wrote:
          I am probably missing something obvious here, but select list on a page are correctly displayed (using the underlying static llist or query), and the default value (static while testing) is displayed, yet it seems that on the very first invocation, the page items are not known on the server-side. Hence report/graph regions that use the items as parameters return 'no data found'. If I submit all works as expected (either through a button, an item change or merely by clicking the tab that displays this page for a 2d time). How do I ensure that the value initially displayed/selected is actually set a the page scope as well?
          Item source/default values affect the items as rendered on the page, not in session state (you can see this by using the Session viewer when the page is first rendered). To set values in both the rendered items and session state, set the initial values using computations or processes rather than item source/default attributes.
          • 2. Re: select lists default value (page item)
            B.Delmée
            Thanks, I suspected something like that, and have actually tried a computation "On New Instance (new session)" -since I do not want to override the user's selection all the time, just initially- but it does not seem to do anything at all. I've used the debugger "session" button which shows the items as unset indeed...
            • 3. Re: select lists default value (page item)
              fac586
              bdelmee wrote:
              Thanks, I suspected something like that, and have actually tried a computation "On New Instance (new session)" -since I do not want to override the user's selection all the time, just initially- but it does not seem to do anything at all. I've used the debugger "session" button which shows the items as unset indeed...
              Stating the obvious: Did you try logging out and logging back in to start a new session?

              If that doesn't work, On New Instance (new session) may not be the appropriate processing point. I've had problems with this in the past as there are some restrictions on what information is available at this point: {thread:id=424459}
              • 4. Re: select lists default value (page item)
                B.Delmée
                Thanks for getting back to me. it seems the 'on New Instance' computation is working as a shared component (yet targetting a page item), but not as a page computation. It'd be tidier to keep initialisation of page items within the page itself, but that'll have to do I suppose.