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

duplicate id exception with JSTL conditional tag

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.1.5
    • None
    • General
    • None
    • JDK 1.5.0_12-b04/Linux amd64 or JDK 1.5.0_07-87/MacOS X, Tomcat 5.5.17

    Description

      It might have been better to reopen MYFACES-603, but observed behavior is slightly different.

      I'm using JSTL's <c:if> to dynamically change view component tree depending on application state. This consistently results in duplicate id exception in JspStateManagerImpl.checkForDuplicateIds(). I have been thinking it's a bad thing to do, but I may have found a problem in MyFaces.

      UIComponentTag.removeFormerChildren method removes former children not seen during rendering. It uses UIComponent.findComponent() for looking up children, but the method returns a child of other UIComponent under certain situations - specifically when two UIComponents have the same id due to changed automatically-assigned IDs. So former UIComponent incorrectly remains in the view tree, causing duplicate id exception.

      Attachments

        1. myfaces-1708-patch.txt
          1 kB
          Kenji Nagahashi

        Activity

          People

            Unassigned Unassigned
            knj Kenji Nagahashi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: