2 Replies Latest reply on May 14, 2008 7:22 AM by Mike Hanafey

    Tree component ids, why double colons?

    Mike Hanafey Newbie

      Starting with 3.2.1 (maybe it was 3.2.0) the ids generated by the tree component changed to include a double colon. A comparison of the generated ids is shown below:

      3.2.1: id="Sequences:SeqTree:0:0::s:text"
      3.1.4: id="Sequences:SeqTree:0:0:s:text"


      This broke some code that was computing ids for the purpose of setting focus.

      Is the double colon a bug, or is this a feature that can be relied on? I'm not sure that the double colon even conforms to the JSF standard.




        • 1. Re: Tree component ids, why double colons?
          Nick Belaevski Master

          Hello,

          That is a feature that has been required to implement invokeOnComponent() properly. Client identifiers have changed that way since 3.2.0. You should better use getClientId() function to obtain client ids.

          I looked through JSF specification and didn't find anything that prohibits usage of double colons in identifiers.

          • 2. Re: Tree component ids, why double colons?
            Mike Hanafey Newbie

            No problem, I was concerned that the double colon was just a bug and that in a future release it would go back to a single colon.

            The other concern is that "::" implies an unnamed naming container, but if it works it is not a problem.

            I was actually computing client ids of a new tree node so that focus could be set on it, so getClientId() does not apply. Also, client side JavaScript may also compute client ids, and so it is nice if they are consistent.