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

    s:selectItems not showing correct value

    Bas Rutten Newbie


      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:


      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).