Children of iterating components receive multiple PostRestoreStateEvents
------------------------------------------------------------------------

                 Key: MYFACES-3037
                 URL: https://issues.apache.org/jira/browse/MYFACES-3037
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 2.0.3
            Reporter: Andy Schwartz


We currently use a tree visit to deliver PostRestoreStateEvents.  By default 
tree visits will cause iterating components (such as UIData/UIRepeat) to 
iterate over all visible rows in the model.  This results in children being 
visited once per iteration - and thus PostRestoreStateEvents re-delivered for 
each row.

An interesting side effect of this is that component binding setters will be 
evaluated multiple times.  For example, in a case like this:


 <h:dataTable value="#{someModel}" var="row">
   <h:column>
     <h:ouputText binding="bean.foo"/>
   </h:column>
 </h:dataTable>

The binding setter (eg. setFoo()) is called multiple times (once per row) in 
2.0.  In 1.2 this was only called one time.

Note that a solution for the following issue:

MYFACES-3036 Support SKIP_ITERATION FacesContext property

Would make fixing this issue simple.  The tree visit that we use for 
PostRestoreStateEvent delivery would simply specify the SKIP_ITERATION hint.


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to