From d7029ed9545bdf809d88868188f58ef3a5c894bb Mon Sep 17 00:00:00 2001 From: Bauke Scholtz Date: Fri, 8 Sep 2023 06:49:44 -0400 Subject: [PATCH] https://github.com/jakartaee/faces/issues/1567 Fixed regression error which caused spec1567IT to fail; the composite instance is needed further down in ComponentNotFoundException block --- .../sun/faces/renderkit/html_basic/AjaxBehaviorRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/impl/src/main/java/com/sun/faces/renderkit/html_basic/AjaxBehaviorRenderer.java b/impl/src/main/java/com/sun/faces/renderkit/html_basic/AjaxBehaviorRenderer.java index d54067e66c..943547fac7 100644 --- a/impl/src/main/java/com/sun/faces/renderkit/html_basic/AjaxBehaviorRenderer.java +++ b/impl/src/main/java/com/sun/faces/renderkit/html_basic/AjaxBehaviorRenderer.java @@ -319,7 +319,7 @@ private static void appendIds(FacesContext facesContext, boolean first = true; - UIComponent composite = (ajaxBehavior instanceof RetargetedAjaxBehavior) ? UIComponent.getCompositeComponentParent(component) : null; + UIComponent composite = UIComponent.getCompositeComponentParent(component); String separatorChar = String.valueOf(getSeparatorChar(facesContext)); for (String id : ids) { @@ -336,7 +336,7 @@ private static void appendIds(FacesContext facesContext, boolean clientResolveableExpression = expression.equals("@all") || expression.equals("@none") || expression.equals("@form") || expression.equals("@this"); - if (composite != null && (expression.equals("@this") || expression.startsWith("@this" + separatorChar))) { + if (composite != null && (ajaxBehavior instanceof RetargetedAjaxBehavior) && (expression.equals("@this") || expression.startsWith("@this" + separatorChar))) { expression = expression.replaceFirst("@this", separatorChar + composite.getClientId(facesContext)); clientResolveableExpression = false; }