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

tree2: tree component can cause duplicate id problems

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.1.1
    • 1.1.1
    • None
    • None

    Description

      The tree2 renderer can cause duplicate id problems. The result is similar/ identical to MYFACES-35.
      It seems that calling context.getViewRoot().createUniqueId() in the renderer messes up the component tree.

      Component tags in the jsp page within the tree or after it call internally UIComponentTag.findComponent().
      In this method the component of the parent tag is resolved ... somehow code is influenced by the call of context.getViewRoot().createUniqueId() in the treerenderer. While testing I found out that in case of the duplicate id problem, the resolved parent component for the tag is the same component (but not the same instance!) that is created with the processed component tag.

      I created a patch, that makes the call to context.getViewRoot().createUniqueId() in the HTMLTreeRenderer obsolete, but it might be a general issue that calling context.getViewRoot().createUniqueId() within the lifecycle may corrupt the component tree.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            schof Sean Schofield
            mathias.werlitz Mathias Werlitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment