diff --git a/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java b/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java index 6675f25d8..f4ad38124 100644 --- a/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java +++ b/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java @@ -401,6 +401,8 @@ public String getClientId(FacesContext context) // Search for an ancestor that is a naming container UIComponent containerComponent = getParent(); + String origId = (null != containerComponent) ? containerComponent.getId() : null; + while (null != containerComponent) { if (containerComponent instanceof NamingContainer) @@ -420,6 +422,8 @@ public String getClientId(FacesContext context) } containerComponent = containerComponent.getParent(); + if (origId != null && origId.equals(containerComponent != null ? containerComponent.getId():null)) + throw new IllegalStateException(); } Renderer renderer = getRenderer(context);