You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "gaston (JIRA)" <de...@myfaces.apache.org> on 2008/02/26 16:14:53 UTC

[jira] Created: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
-------------------------------------------------------------------------

                 Key: MYFACES-1825
                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.1.5
            Reporter: gaston


Some duplicate id are detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.

I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds() : 

this code seems to be wrong :
        boolean namingContainer = component instanceof NamingContainer;
        while (it.hasNext()) {
            UIComponent kid = (UIComponent) it.next();
            if (namingContainer) {
                checkForDuplicateIds(context, kid, new HashSet());
            }
            else {
                checkForDuplicateIds(context, kid, ids);
            }
        }


It should be :
        while (it.hasNext()) {
            UIComponent kid = (UIComponent) it.next();
            boolean namingContainer = kid instanceof NamingContainer;
            if (namingContainer) {
                checkForDuplicateIds(context, kid, new HashSet());
            }
            else {
                checkForDuplicateIds(context, kid, ids);
            }
        }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann resolved MYFACES-1825.
------------------------------------

    Resolution: Fixed

> duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-1825
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: gaston
>            Assignee: Bernd Bohmann
>             Fix For:  1.1.6-SNAPSHOT, 1.2.3-SNAPSHOT
>
>
> Some duplicate id are not detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.
> I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds() : 
> this code seems to be wrong :
>         boolean namingContainer = component instanceof NamingContainer;
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }
> It should be :
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             boolean namingContainer = kid instanceof NamingContainer;
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590417#action_12590417 ] 

Bernd Bohmann commented on MYFACES-1825:
----------------------------------------

I think it should be:

Iterator it = component.getFacetsAndChildren();
if (component instanceof NamingContainer)
{
      ids = new HashSet<String>();
}
while (it.hasNext())
{
      UIComponent kid = (UIComponent) it.next();
      checkForDuplicateIds(context, kid, ids);
}

If you agree I will commit this change.

> duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-1825
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: gaston
>            Assignee: Leonardo Uribe
>             Fix For:  1.1.6-SNAPSHOT, 1.2.3-SNAPSHOT
>
>
> Some duplicate id are not detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.
> I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds() : 
> this code seems to be wrong :
>         boolean namingContainer = component instanceof NamingContainer;
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }
> It should be :
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             boolean namingContainer = kid instanceof NamingContainer;
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591225#action_12591225 ] 

Bernd Bohmann commented on MYFACES-1825:
----------------------------------------

fixed 
too many idea frames open :-)

> duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-1825
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: gaston
>            Assignee: Bernd Bohmann
>             Fix For:  1.1.6-SNAPSHOT, 1.2.3-SNAPSHOT
>
>
> Some duplicate id are not detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.
> I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds() : 
> this code seems to be wrong :
>         boolean namingContainer = component instanceof NamingContainer;
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }
> It should be :
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             boolean namingContainer = kid instanceof NamingContainer;
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann reopened MYFACES-1825:
------------------------------------


> duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-1825
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: gaston
>            Assignee: Leonardo Uribe
>             Fix For:  1.1.6-SNAPSHOT, 1.2.3-SNAPSHOT
>
>
> Some duplicate id are not detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.
> I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds() : 
> this code seems to be wrong :
>         boolean namingContainer = component instanceof NamingContainer;
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }
> It should be :
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             boolean namingContainer = kid instanceof NamingContainer;
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590843#action_12590843 ] 

Leonardo Uribe commented on MYFACES-1825:
-----------------------------------------

Yes, checking the actual code it seems that does not detect if two components that are instance of NamingContainer are duplicated on the tree. Feel free to commit this change.

> duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-1825
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: gaston
>            Assignee: Leonardo Uribe
>             Fix For:  1.1.6-SNAPSHOT, 1.2.3-SNAPSHOT
>
>
> Some duplicate id are not detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.
> I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds() : 
> this code seems to be wrong :
>         boolean namingContainer = component instanceof NamingContainer;
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }
> It should be :
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             boolean namingContainer = kid instanceof NamingContainer;
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591219#action_12591219 ] 

Gerhard Petracek commented on MYFACES-1825:
-------------------------------------------

the usage of generics breaks the build

> duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-1825
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: gaston
>            Assignee: Bernd Bohmann
>             Fix For:  1.1.6-SNAPSHOT, 1.2.3-SNAPSHOT
>
>
> Some duplicate id are not detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.
> I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds() : 
> this code seems to be wrong :
>         boolean namingContainer = component instanceof NamingContainer;
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }
> It should be :
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             boolean namingContainer = kid instanceof NamingContainer;
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.