Duplicate Id error when model of forEach is changed
---------------------------------------------------
Key: MYFACES-3389
URL: https://issues.apache.org/jira/browse/MYFACES-3389
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.1.2
Reporter: Michael Dietrich
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira