ICEfaces
  1. ICEfaces
  2. ICE-10129

Add the capability to dynamically change the lang attribute of an <html> tag.

    Details

      Description

      Feature Request: Currently for Internationalization with ICEfaces we recommend changing the f:view locale attribute to reflect the change in locale. The issue with this is that it does not reflect these changes to the <html> lang attribute.

      The HTML lang attribute helps search robots interpret the page and provide tools such as automatic translation. This is an SEO recommendation.

      First step would be to see if this is possible under the JSF/ICEfaces framework.

        Activity

        Hide
        Arran Mccullough added a comment -

        Uploaded sample test case showing issue when dynamically changing the HTML lang attribute.

        Steps:

        • Load welcomeICEfaces.jsf
        • Click on the links to change the locale/lang. An error will show shown in the server console: org.icefaces.impl.util.DOMUtils.nodeDiff Diff propagated to root but no ID set [html: null]
        Show
        Arran Mccullough added a comment - Uploaded sample test case showing issue when dynamically changing the HTML lang attribute. Steps: Load welcomeICEfaces.jsf Click on the links to change the locale/lang. An error will show shown in the server console: org.icefaces.impl.util.DOMUtils.nodeDiff Diff propagated to root but no ID set [html: null]
        Hide
        Mircea Toma added a comment - - edited

        Modified DOMResposeWriter to add an 'id' attribute to the 'html' element when missing so that element's attributes can be updated. The 'id' attribute is added only when org.icefaces.diffConfig contains the 'att' setting since only then the 'html' attributes can be modified, full 'html' element update was never supported by JSF or most of the browsers.

        Show
        Mircea Toma added a comment - - edited Modified DOMResposeWriter to add an 'id' attribute to the 'html' element when missing so that element's attributes can be updated. The 'id' attribute is added only when org.icefaces.diffConfig contains the 'att' setting since only then the 'html' attributes can be modified, full 'html' element update was never supported by JSF or most of the browsers.
        Hide
        Mircea Toma added a comment -

        Verify if org.icefaces.diffConfig parameter is null before using its value.

        Show
        Mircea Toma added a comment - Verify if org.icefaces.diffConfig parameter is null before using its value.
        Hide
        Mircea Toma added a comment - - edited

        As already explained above the following context parameter needs to be added into web.xml file in order for the updates to work:

            <context-param>
                <param-name>org.icefaces.diffConfig</param-name>
                <param-value>att</param-value>
            </context-param>
        
        Show
        Mircea Toma added a comment - - edited As already explained above the following context parameter needs to be added into web.xml file in order for the updates to work: <context-param> <param-name>org.icefaces.diffConfig</param-name> <param-value>att</param-value> </context-param>

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: