javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-118

note that since the IDs are generated the IDs may not match

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.7-5
    • Fix Version/s: 7.0.1
    • Component/s: doc
    • Labels:
      None

      Description

      There is an example at the end of the "Rendering a Hyperlink with the h:commandLink Tag" section of the page at http://docs.oracle.com/javaee/6/tutorial/doc/bnarf.html titled "Adding Components to a Page Using HTML Tags". It may be worth noting that the IDs are generated so they may not match. I believe there are also two JSF implementations. I'm sure MyFaces wouldn't generate calls to functions in a mojarra object.

        Activity

        Hide
        Kim Haase added a comment -

        We definitely need to point out that the generated IDs are implementation-specific and that the prefixes will probably not be the same as the ones shown.

        I think there are even more than two JSF implementations around, but we assume that tutorial users are using only GlassFish.

        Show
        Kim Haase added a comment - We definitely need to point out that the generated IDs are implementation-specific and that the prefixes will probably not be the same as the ones shown. I think there are even more than two JSF implementations around, but we assume that tutorial users are using only GlassFish.
        Hide
        Ian Evans added a comment -

        I'm trying to understand why the generated IDs would matter to web developers, and I'm coming up empty.

        It's true that the generated IDs in the HTML will vary by implementation, since the spec doesn't require them to match the IDs in the Facelets tags. But I can't think of a use-case where output HTML from one implementation would mix with output HTML from another implementation.

        The only scenario I can think of where the IDs matter is for a custom Javascript library. However, if you're writing your own Javascript that uses the HTML tag IDs, you're going beyond the platform, and are relying on non-portable features.

        Show
        Ian Evans added a comment - I'm trying to understand why the generated IDs would matter to web developers, and I'm coming up empty. It's true that the generated IDs in the HTML will vary by implementation, since the spec doesn't require them to match the IDs in the Facelets tags. But I can't think of a use-case where output HTML from one implementation would mix with output HTML from another implementation. The only scenario I can think of where the IDs matter is for a custom Javascript library. However, if you're writing your own Javascript that uses the HTML tag IDs, you're going beyond the platform, and are relying on non-portable features.
        Hide
        Brant Gurganus added a comment -

        I agree with Ian's statements. However, in the context of a tutorial, there can be an expectation that what is shown in output in the tutorial would match your own output. The issue is more about that expectation and managing that than about interoperating with the IDs.

        Show
        Brant Gurganus added a comment - I agree with Ian's statements. However, in the context of a tutorial, there can be an expectation that what is shown in output in the tutorial would match your own output. The issue is more about that expectation and managing that than about interoperating with the IDs.
        Hide
        Kim Haase added a comment -

        I think that for anyone running GlassFish the output will be exactly that or something very similar, but I changed it to "HTML that looks something like the following".

        Fixed for 7.0.1.

        Show
        Kim Haase added a comment - I think that for anyone running GlassFish the output will be exactly that or something very similar, but I changed it to "HTML that looks something like the following". Fixed for 7.0.1.

          People

          • Assignee:
            Kim Haase
            Reporter:
            Brant Gurganus
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: