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

UIViewRoot.createUniqueId() should generate unique ids for all the component tree.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.17, 2.1.11
    • None
    • None

    Description

      In JSF 2.2 spec there is a change related to UIViewRoot.createUniqueId(). The javadoc says this:

      "... Generate an identifier for a component. The identifier will be prefixed with UNIQUE_ID_PREFIX, and will be unique within the non-NamingContainer child sub-trees of this UIViewRoot. ..."

      Thinking in MYFACES-3660, this fact becomes more evident. I think we should not wait to 2.2 and instead implement this is 2.1.x/2.0.x branches because it will improve the stability of the component tree under dynamic addition/removal.

      The suggested solution is do something like this:

      j_id__v_1
      j_id__v_2
      j_id__v_3
      j_id__v_4
      ....

      This solution will keep ids small and will not cause any conflict with facelet created components or components that receive the ids through UniqueIdVendor/NamingContainer hierarchy:

      j_id1
      j_id2
      j_id3
      j_id4

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: