3 Replies Latest reply on Oct 16, 2007 6:55 PM by pmuir

    s:selectItems not showing correct value

    basrutten

      Hi,

      I recently switched from Seam 1.2.1.GA to Seam 2.0.0.CR2 and this switch seems to have broken the behaviour of <s:selectItems/>

      The problem also seems to be discussed in this thread:

      http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061427#4061427

      but there is not really any mention of a resolution. The application I'm working on uses a similar construct to the one described in the thread above; it contains a shuttle dialog with two h:selectManyListBoxes. You can select items in one listbox and transfer them to the other listbox and vice versa.

      I've compared the source of the org.jboss.seam.ui.UISelectItems class from 1.2.1.GA to that of the 2.0.0.CR2 version and it seems that the 2.0.0.CR2 version uses so kind of value caching; the value is only evaluated once and then stored for the rest of the request. This causes problems in my application, where I modify the value of the underlying backing bean during the invoke application phase. However, in the render response phase, the cached value is used instead of the actual value. So, my underlying model is correct but the view still displays the old state. If I refresh the view (e.g. by pressing a button that does nothing but rerender the page) then everything is fine again (the correct values are shown).

        • 1. Re: s:selectItems not showing correct value
          pmuir

          The resolution was that I altered the compoent so that if the value changes then the cached value is updated.

          • 2. Re: s:selectItems not showing correct value
            basrutten

            first of all thx for the speedy answer.

            Maybe i'm missing something really obvious here, but in which version exactly is this supposed to be fixed? It does not appear to be working in 2.0.0.CR2. I've just downloaded the latest nightly build and tried to use that, but with this version my application doesn't even deploy any more (due apparently to something completely unrelated which I really don't have the time to investigate) and the code in UISelectItems does not seem to have significantly changed between the nightly build and the 2.0.0.CR2 version.

            • 3. Re: s:selectItems not showing correct value
              pmuir

              Not sure, probably CR1. You know, you might get better help if you post *your* problem, rather than just saying me to, me to.