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

Override of uniqueIdCounter for UIViewRoot in restoreView cause component duplicate id exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.18, 2.1.12
    • JSR-314
    • None

    Description

      I have found an issue with the solution applied in MYFACES-3663. The steps to cause the problem are the following:

      1. The view is rendered and some unique ids are generated. UIViewRoot has state and it is saved.
      2. The view needs to be restored, PSS algorithm takes the uniqueIdCounter from the state and set it to UIViewRoot, then the initial state is constructed using facelets algorithm
      3. Inside facelets algorithm, a new component is created and that increase uniqueIdCounter (f:ajax tag handler adds default jsf.js and ask for a unique id from UIViewRoot).
      4. The delta state is applied, overriding uniqueIdCounter.
      5. A new component is created in render response phase, creating the duplicate id condition.
      6. The state saving algorithm detects the duplicate id and throw duplicate id exception.

      The conditions required to reproduce the problem are very unlikely, so other tests done were not able to reproduce the problem.

      Attachments

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              lu4242 Leonardo Uribe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: