myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Andraschko (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Comment Edited] (MYFACES-4182) javax.faces.component.search.ComponentNotFoundException
Date Sun, 17 Dec 2017 22:31:03 GMT

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

Thomas Andraschko edited comment on MYFACES-4182 at 12/17/17 10:30 PM:
-----------------------------------------------------------------------

1) We should check how it's implemented in this case and where the search starts. I would
say that it's expected as the the component will be rendered inside the CC and the parent
is a wrapped input, which is the root of the search and not the CC itself. Inside the CC,
a absolute expression would be required.
Does this work in Mojarra 2.3?
2) Works now because we fallback to #invokeOnComponent.


was (Author: tandraschko):
1) We should check how it's implemented in this case and where the search starts. Does this
work in Mojarra 2.3?
2) Works now because we fallback to #invokeOnComponent.

> 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