[
https://issues.apache.org/jira/browse/MYFACES-4298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892080#comment-16892080
]
Thomas Andraschko commented on MYFACES-4298:
--------------------------------------------
I think that this behavior is expected. Can you try it with mojarra?
> h:form with prependId="false" causes findComponent to return null for valid
> clientId
> ------------------------------------------------------------------------------------
>
> Key: MYFACES-4298
> URL: https://issues.apache.org/jira/browse/MYFACES-4298
> Project: MyFaces Core
> Issue Type: Bug
> Reporter: Luigi Labigalini
> Priority: Critical
>
> This happens because `findComponent` is only diving into the component tree
> if it is not an instance of `NamingContainer`. From what I know the only
> exception is `UIForm` since it's the only one that has a the attribute
> `prependId`.
>
> My solution would be to make the following change:
> {code:java}
> if (!(child instanceof NamingContainer) ||
> (child instanceof UIForm && !((UIForm) child).isPrependId()))
> {
> ...
> }
> {code}
> [https://github.com/apache/myfaces/blob/master/api/src/main/java/javax/faces/component/_ComponentUtils.java#L166-L173]
>
> I'll create a Pull Request with these changes as soon as someone validates
> that this is really a bug and if anyone has any suggestions or requests like
> 'please don't forget to create a test on X and Y' or 'don't forget to also
> change version Z and W' I'll be more than happy to do it.
> I had a bad experience on my previous contribution attempt but I still want
> to become and active contributor so if possible please tell me what are the
> next steps so I can have my contribution merged.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)