javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-117

incorrect en_US example instead of en-US and capitalized dir examples

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.7-5
    • Fix Version/s: 7.0.0
    • Component/s: doc
    • Labels:
      None

      Description

      This occurs in the "Table 7-4 Input Tag Attributes" table on http://docs.oracle.com/javaee/6/tutorial/doc/bnarf.html. HTML language codes are en-US, not en_US. This format is described at http://www.ietf.org/rfc/rfc1766.txt. Similarly, attributes are case sensitive in the XHTML world, so the dir attribute example values should be "ltr" and "rtl", not "LTR" and "RTL".

        Activity

        Brant Gurganus created issue -
        Hide
        Kim Haase added a comment -

        Actually, in Java the language codes do have underscores (see http://docs.oracle.com/javaee/6/tutorial/doc/bnaxv.html and the API documentation for the java.util.locale class). Underscores seem to be common on UNIX systems, while hyphens are used on Windows systems and in web browsers, but we're in the Java world here.

        Also, the JSF input tag attributes do apparently take the attribute names in uppercase, according to the Facelets tag documentation at http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/; see h:inputText, for example. Presumably this is converted to lowercase by the implementation.

        Show
        Kim Haase added a comment - Actually, in Java the language codes do have underscores (see http://docs.oracle.com/javaee/6/tutorial/doc/bnaxv.html and the API documentation for the java.util.locale class). Underscores seem to be common on UNIX systems, while hyphens are used on Windows systems and in web browsers, but we're in the Java world here. Also, the JSF input tag attributes do apparently take the attribute names in uppercase, according to the Facelets tag documentation at http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/ ; see h:inputText, for example. Presumably this is converted to lowercase by the implementation.
        Kim Haase made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Invalid [ 6 ]
        Hide
        Brant Gurganus added a comment -

        I tested it out.
        I put in a page:
        <h:inputText lang="en_US"/>

        This was in the output.
        <input type="text" name="j_idt13" lang="en_US" />

        It is correct from a JSF standpoint. JSF just puts the lang contents (after evaluation any EL expression) into the rendered lang attribute. So I can put lang="banana" in the JSF and get lang="banana" rendered even though that is clearly nonsense. It is not correct from an HTML standpoint where the valid language format comes from the RFC I mentioned. You can make up your own language tags, but those should be prefixed with an x- like x-gibberish.

        Show
        Brant Gurganus added a comment - I tested it out. I put in a page: <h:inputText lang="en_US"/> This was in the output. <input type="text" name="j_idt13" lang="en_US" /> It is correct from a JSF standpoint. JSF just puts the lang contents (after evaluation any EL expression) into the rendered lang attribute. So I can put lang="banana" in the JSF and get lang="banana" rendered even though that is clearly nonsense. It is not correct from an HTML standpoint where the valid language format comes from the RFC I mentioned. You can make up your own language tags, but those should be prefixed with an x- like x-gibberish.
        Hide
        Kim Haase added a comment -

        I'll investigate this further. Thanks.

        Show
        Kim Haase added a comment - I'll investigate this further. Thanks.
        Kim Haase made changes -
        Resolution Invalid [ 6 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Kim Haase [ chaase3 ]
        Ian Evans made changes -
        Affects Version/s 6.0.7-5 [ 15851 ]
        Affects Version/s current [ 10661 ]
        Hide
        Ed Burns added a comment -

        M jsf-api/doc/i18n-props.xml
        M jsf-api/doc/standard-html-renderkit.xml

        <description>
        Direction indication for text that does not inherit directionality.
        Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
        + These attributes are case sensitive when rendering to XHTML, so
        + care must be taken to have the correct case.
        </description>
        Sending jsf-api/doc/i18n-props.xml
        Sending jsf-api/doc/standard-html-renderkit.xml
        Transmitting file data ..
        Committed revision 11665.

        Show
        Ed Burns added a comment - M jsf-api/doc/i18n-props.xml M jsf-api/doc/standard-html-renderkit.xml <description> Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). + These attributes are case sensitive when rendering to XHTML, so + care must be taken to have the correct case. </description> Sending jsf-api/doc/i18n-props.xml Sending jsf-api/doc/standard-html-renderkit.xml Transmitting file data .. Committed revision 11665.
        Hide
        Kim Haase added a comment -

        Thanks very much again. Fixed in source.

        Show
        Kim Haase added a comment - Thanks very much again. Fixed in source.
        Kim Haase made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 7.0.0 [ 15607 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: