javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2481

Duplicated component ID when calling createComponent in FaceletFactory twice

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-m04
    • Fix Version/s: 2.2.0-m06
    • Component/s: composite components
    • Labels:
      None
    • Environment:

      glassfish 3.1.2

      Description

      When I call createComponent(String taglibURI, String tagName, Map<String,Object> attributes) in FaceletFactory twice with the same arguments. The returned two components by default have the same id.
      As a workaround, I can change the id after I get the component.

      -jason

        Issue Links

          Activity

          Hide
          Manfred Riem added a comment -

          Problem introduced as a consequence of spec issue #599

          Show
          Manfred Riem added a comment - Problem introduced as a consequence of spec issue #599
          Hide
          Ed Burns added a comment -

          This issue is really calling for the re-implementation of JAVASERVERFACES_SPEC_PUBLIC-599, whose purpose is to make it possible to programmatically instantiate composite components given only the taglibURI, the tag name, and the attributes.

          There are two ways to address this.

          The easy way is to make it so the id conflict no longer happens.

          A harder way is to drop the usage of a temporary file, which is seldom a good idea anyway, and instead use facelet implementation private APIs to get the job done.

          Show
          Ed Burns added a comment - This issue is really calling for the re-implementation of JAVASERVERFACES_SPEC_PUBLIC-599 , whose purpose is to make it possible to programmatically instantiate composite components given only the taglibURI, the tag name, and the attributes. There are two ways to address this. The easy way is to make it so the id conflict no longer happens. A harder way is to drop the usage of a temporary file, which is seldom a good idea anyway, and instead use facelet implementation private APIs to get the job done.
          Hide
          Manfred Riem added a comment -

          svn commit -m "When creating a component make sure the id is not set when we return, r=rogerk"
          Sending jsf-ri\src\main\java\com\sun\faces\facelets\impl\DefaultFaceletFactory.java
          Transmitting file data .
          Committed revision 10574.

          Show
          Manfred Riem added a comment - svn commit -m "When creating a component make sure the id is not set when we return, r=rogerk" Sending jsf-ri\src\main\java\com\sun\faces\facelets\impl\DefaultFaceletFactory.java Transmitting file data . Committed revision 10574.

            People

            • Assignee:
              Manfred Riem
              Reporter:
              jasonzhang2002gmailcom
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: