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

Duplicate Id error when model of forEach is changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.1.2
    • None
    • None
    • None

    Description

      We have a use case, where the model (i.e. items) of a forEach is changed in the Invoke Application phase, in a way that rows are added or deleted in the middle of the model.
      During the buildView(...) in the Render Response phase, the forEach Tag Handler recognizes, that the model has changed, and for example that now one more row is available, but it does not recognize, that this row was not added as last row. So the forEach Tag Handler logic starts to create additional components for the additional row, but it creates these components for entries at the end of the model. The issue is, that there already exist components for the last row in the UIViewRoot and these componts already have the same Ids than the newly created ones. Thus we end up with a Duplicate Id Exception

      The attached file might help you, to recreate the issue with a simple example.

      Attachments

        1. MyFaces212ForEachTest.war
          3.73 MB
          Michael Dietrich

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              m.dietrich Michael Dietrich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: