You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2013/05/12 19:57:15 UTC

[jira] [Created] (MYFACES-3721) Override of uniqueIdCounter for UIViewRoot in restoreView cause component duplicate id exception

Leonardo Uribe created MYFACES-3721:
---------------------------------------

             Summary: Override of uniqueIdCounter for UIViewRoot in restoreView cause component duplicate id exception
                 Key: MYFACES-3721
                 URL: https://issues.apache.org/jira/browse/MYFACES-3721
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-314
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


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.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira