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

Luigi Labigalini commented on MYFACES-4298:
-------------------------------------------

>From your SO link: [https://github.com/javaee/javaserverfaces-spec/issues/573]

Marked as won't fix, do you think I should ask around if this should be 
implemented? I don't we'll ever get rid of the `prependId` so why not make it 
work?

> 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)

Reply via email to