Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3037

Children of iterating components receive multiple PostRestoreStateEvents

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3
    • 2.0.4
    • General
    • None

    Description

      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.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            andy.schwartz Andy Schwartz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: