Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-1825

duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.5
    • 1.2.3
    • None
    • None

    Description

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

      }

      Attachments

        Activity

          People

            bommel Bernd Bohmann
            gaston Gastón Kleiman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: