melloware commented on code in PR #607:
URL: https://github.com/apache/myfaces/pull/607#discussion_r1341949037
##########
impl/src/main/java/org/apache/myfaces/view/facelets/PartialStateManagementStrategy.java:
##########
@@ -642,14 +642,26 @@ public void invokeContextCallback(FacesContext context,
UIComponent target)
{
try
{
- target.getChildren().add(childIndex, child);
+ UIComponent parent = target;
+ UIComponent dup = parent.getChildren().get(childIndex);
+ if (child.getId().equals(dup.getId())) // avoid
DuplicateIdException
+ {
+ parent.getChildren().remove(childIndex.intValue());
+ parent.getChildren().add(childIndex, child);
+ }
+ else
+ {
+ target.getChildren().add(childIndex, child);
+ }
}
catch (IndexOutOfBoundsException e)
{
// We can't be sure about where should be this
// item, so just add it.
+ System.out.println("VS: ADDED");
Review Comment:
Remove System.out.println but other than that LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]