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

Duplicate id using a facet and multiple <c:if> blocks in a composite component

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.13, 2.1.7
    • None
    • None
    • MyFaces 2.1.6, Tomahawk20 1.1.11

    Description

      Hello,

      I get an IllegalStateException using a facet in a composite component. The facet gets the same id as the internal 'composite component'-facet. The facet is created using CumponentSupport.addFacet(). Here the id of the facet is generated using the view root instead of the UniqueIdVendor of the parent to whom the facet is added.

      In other places the id is retrieved with something like

      FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(facesContext);
      UniqueIdVendor uniqueIdVendor = mctx.getUniqueIdVendorFromStack();
      if (uniqueIdVendor == null)

      { uniqueIdVendor = facesContext.getViewRoot(); }

      String uid = uniqueIdVendor.createUniqueId(facesContext, null);

      Attachments

        Activity

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

          People

            lu4242 Leonardo Uribe
            hoersch dennis hoersch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment