Paul Nicolucci created MYFACES-4182: ---------------------------------------
Summary: javax.faces.component.search.ComponentNotFoundException Key: MYFACES-4182 URL: https://issues.apache.org/jira/browse/MYFACES-4182 Project: MyFaces Core Issue Type: Bug Components: JSR-372 Affects Versions: 2.3.0-beta Reporter: Paul Nicolucci I noticed a behavior difference when using a composite component and ajax between jsf 2.3 and jsf 2.2. I've attached a test application that reproduces. JSF 2.2 Behavior when form prependId=false: If we reference the outputText id in the render attribute with the form id prepended then the page is successfully rendered (testpage1.jsf) If we reference the outputText id without the form id prepended we get the following failure (testpage2.jsf) when requesting the page: javax.faces.FacesException: Component with id:output2 not found at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.getComponentId(HtmlAjaxBehaviorRenderer.java:505) at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.build(HtmlAjaxBehaviorRenderer.java:467) at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.mapToString(HtmlAjaxBehaviorRenderer.java:439) at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.makeAjax(HtmlAjaxBehaviorRenderer.java:158) at org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.getScript(HtmlAjaxBehaviorRenderer.java:102) at javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:101) at org.apache.myfaces.shared.renderkit.html.CommonEventUtils.renderBehaviorizedAttribute(CommonEventUtils.java:188) at org.apache.myfaces.shared.renderkit.html.CommonEventUtils.renderBehaviorizedAttribute(CommonEventUtils.java:120) at org.apache.myfaces.shared.renderkit.html.CommonEventUtils.renderBehaviorizedEventHandlers(CommonEventUtils.java:283) at org.apache.myfaces.shared.renderkit.html.CommonEventUtils.renderBehaviorizedEventHandlers(CommonEventUtils.java:202) JSF 2.3 Behavior when form preprendId=false: If we reference the outputText id in the render attribute with the form id prepended then we get the following failure (testpage1.jsf) when requesting the page: Cannot find component for expression "testForm:output2" referenced from "input1:input". viewId=/testpage1.xhtml location=C:\libertyGit\libertycdopen\WS-CD-Open\dev\build.image\wlp\usr\servers\test1\apps\expanded\TestApp.war\testpage1.xhtml phaseId=RENDER_RESPONSE(6) Caused by: javax.faces.component.search.ComponentNotFoundException - Cannot find component for expression "testForm:output2" referenced from "input1:input". at org.apache.myfaces.component.search.SearchExpressionHandlerImpl.resolveClientId(SearchExpressionHandlerImpl.java:104) If we reference the outputText id without the form id prepended then the page is successfully rendered (testpage2.jsf) -- This message was sent by Atlassian JIRA (v6.4.14#64029)