You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2023/10/17 14:39:03 UTC
[myfaces] branch main updated: MYFACES-4631 (#614)
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/main by this push:
new e2f521781 MYFACES-4631 (#614)
e2f521781 is described below
commit e2f5217815a32d98bb30038926060d7e56e59fba
Author: Volodymyr Siedlecki <vo...@gmail.com>
AuthorDate: Tue Oct 17 10:38:57 2023 -0400
MYFACES-4631 (#614)
---
api/src/main/java/jakarta/faces/component/UIViewRoot.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/api/src/main/java/jakarta/faces/component/UIViewRoot.java b/api/src/main/java/jakarta/faces/component/UIViewRoot.java
index b194487e2..c1f85ee6e 100644
--- a/api/src/main/java/jakarta/faces/component/UIViewRoot.java
+++ b/api/src/main/java/jakarta/faces/component/UIViewRoot.java
@@ -221,6 +221,18 @@ public class UIViewRoot extends UIComponentBase implements UniqueIdVendor
// https://issues.apache.org/jira/browse/MYFACES-2775
componentId = createUniqueId(context, null);
componentResource.setId(componentId);
+ List<UIComponent> children = componentResource.getChildren();
+
+ /*
+ * MYFACES-4631
+ * Duplicate ID Exception can occur if children also aren't assigned unique IDs
+ * See https://github.com/primefaces-extensions/primefaces-extensions/issues/517
+ */
+ for(UIComponent child : children) {
+ String childId = createUniqueId(context, null);
+ child.setId(childId);
+ // TODO - Should we nest down further?
+ }
}
// This var helps to handle the case when we try to add a component that already is