myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Nicolucci (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-4182) javax.faces.component.search.ComponentNotFoundException
Date Mon, 18 Dec 2017 16:48:00 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-4182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16295231#comment-16295231
] 

Paul Nicolucci commented on MYFACES-4182:
-----------------------------------------

Thanks for the help, I've resolved it as "won't fix".

> 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
>         Attachments: TestApp.war
>
>
> 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:*
> 1 )If we reference the outputText id in the render attribute with the form id prepended
then the page is successfully rendered (testpage1.jsf)
> 2) If we reference the outputText id without the form id prepended we get the following
failure (testpage2.jsf) when requesting the page:
> {code:java}
> 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)

> {code}
> *JSF 2.3 Behavior when form preprendId=false:*
> 1) 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:
> {code:java}
> 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)
> {code}
> 2) If we reference the outputText id without the form id prepended then the page is successfully
rendered (testpage2.jsf)
> The behavior between jsf 2.2 and jsf 2.3 is reverse, in jsf 2.3 we do not work with the
prepended form id and in jsf 2.2 we require the prepended form id. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message