You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Luigi Labigalini (JIRA)" <de...@myfaces.apache.org> on 2019/07/24 17:41:00 UTC
[jira] [Created] (MYFACES-4298) h:form with prependId="false"
causes findComponent to return null for valid clientId
Luigi Labigalini created MYFACES-4298:
-----------------------------------------
Summary: 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
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)