You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2011/08/14 19:57:27 UTC

[jira] [Reopened] (MYFACES-3268) UIComponentBase.findComponent does not allow use the same id for a child component.

     [ https://issues.apache.org/jira/browse/MYFACES-3268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe reopened MYFACES-3268:
-------------------------------------


Trying a more complex case, the solution fails, because it does not consider that findComponent try to find a base before iterate.

> UIComponentBase.findComponent does not allow use the same id for a child component.
> -----------------------------------------------------------------------------------
>
>                 Key: MYFACES-3268
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3268
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.8, 2.1.2
>
>
> Suppose the following tree
> x
> |-x
> and the following search expression:
> x:x
> The current algorithm has at the end this line:
> return findBase.findComponent(expr.substring(separator + 1));
> The effect of this call is the component is not found, because the first x is swallowed, but the recursive call over the same component return the parent again, so the expected component is not returned, instead the parent.
> It is rare to use this kind of code, but with composite components, there are NamingContainer instances everywhere, which makes this issue more probable.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira