0 Replies Latest reply on Dec 13, 2012 1:13 PM by duc tun vu

    nested rich:datatable within a:repeat caches iteration variable

    duc tun vu Newbie

      Hi guys,


      has someone seen this issue:


      <h:form id="form">

      <a:repeat value="#{outerList}" var="outer">

           <rich:dataTable value="#{outer.innerList}" var="inner">




                     <a:commandButton action="#{someBean.someActionWhichCreateNewOuterList()}" render="form" />



                     <a:commandButton action="#{someBean.otherActionWhichOnlyRerendersTheForm()}" render="form" />







      The issue:

      After clicking the ajax button a new 'outerList' object is created with all new elements, therefor the inner-objects should be new too and complete the snippet should be rerenderd. ...But the #{inner.toString()} always give you the old value!!! after the action but the expression #{inner.someProperty} give you new values. Can you imagine that? And now, when you click the other action 'otherActionWhichOnlyRerendersTheForm' then you will see the new values of the #{inner.toString()}. I tried to replace the rich:dataTable with rich:dataList --> SAME RESULT!


      What i also find strange is, that it only happens with the expression #{inner.toString()}, if you try to print out the outer-objects of the outer loop, all work fine!


      Stack: JBoss 7.1., Richfaces 4.2.2, Seam 2.3. someBean, outerList objects in this example are Conversation-scoped.


      Any idea?


      Thank you for attention!