ICEfaces
  1. ICEfaces
  2. ICE-9436

Support for JSF 2.2 HTML 5 passthrough attributes

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces, JSF 2.2
    • Assignee Priority:
      P2
    • Affects:
      Compatibility/Configuration

      Description

      JSF 2.2 supports HTML 5 through passthrough attributes and data-* attributes. These must be supported with the ICEfaces DOM diff and ajax page updates.

      Additional references:

      http://jsfcorner.blogspot.ca/2013/06/jsf-22-pass-through-attributes.html
      http://jdevelopment.nl/jsf-22/

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment - - edited

          It looks like things did go wrong, both for h:* and ace:* components.

          In case of h:* components the attributes that are really allowed to be rendered are defined in com.sun.faces.renderkit.AttributeManager. They seem to be hardcoded. So when the component implementation class in found in javax.faces.component package RenderKitUtils will choose an optimised method of rendering the passthrough attribute (renderPassThruAttributesOptimized() method) which will skip rendering the attributes that are not listed in the AtributeManager for the component.

          In case of ace:* components some HTML5 attributes are rendered but when they are updated, thir value won't change. For example components that render input elements have this problem (we know already that input element updates are treated differently).

          Show
          Mircea Toma added a comment - - edited It looks like things did go wrong, both for h:* and ace:* components. In case of h:* components the attributes that are really allowed to be rendered are defined in com.sun.faces.renderkit.AttributeManager . They seem to be hardcoded. So when the component implementation class in found in javax.faces.component package RenderKitUtils will choose an optimised method of rendering the passthrough attribute (renderPassThruAttributesOptimized() method) which will skip rendering the attributes that are not listed in the AtributeManager for the component. In case of ace:* components some HTML5 attributes are rendered but when they are updated, thir value won't change. For example components that render input elements have this problem (we know already that input element updates are treated differently).
          Hide
          Mircea Toma added a comment -

          It seems Mojarra renders the component passthrough attributes in its HTMLResponseWriter. That is the reason why these attributes are not rendered in ICEfaces enabled apps, DOMResponseWriter does not have this featured yet.

          Creating off-spring issue ICE-9681.

          Show
          Mircea Toma added a comment - It seems Mojarra renders the component passthrough attributes in its HTMLResponseWriter. That is the reason why these attributes are not rendered in ICEfaces enabled apps, DOMResponseWriter does not have this featured yet. Creating off-spring issue ICE-9681 .
          Hide
          Mircea Toma added a comment -

          Some of ACE components can be further modified to be aware of the new HTML5 attributes:

          ace:autoCompleteEntry

          • the input types that make sense are: email, number, tel, url

          ace:textEntry

          • the input types that make sense are: text, date, datetime, datetime-local, email, month, number, range, search, tel, time, url, week
          • additional attributes that support certain input types are: step, min, max, pattern
          Show
          Mircea Toma added a comment - Some of ACE components can be further modified to be aware of the new HTML5 attributes: ace:autoCompleteEntry the input types that make sense are: email, number, tel, url ace:textEntry the input types that make sense are: text, date, datetime, datetime-local, email, month, number, range, search, tel, time, url, week additional attributes that support certain input types are: step, min, max, pattern
          Hide
          Mircea Toma added a comment -

          All of ACE component can be changed also to support the data-* attributes. The root element in the markup rendered by each component can receive these attributes.

          Show
          Mircea Toma added a comment - All of ACE component can be changed also to support the data-* attributes. The root element in the markup rendered by each component can receive these attributes.
          Hide
          Mircea Toma added a comment -

          Modified DOMREsponseWriter to render only data-* pass-through attributes. Modified all ACE component renderers to pass in the component to the ResponseWriter.startElement method only when the element owning the client ID is written out thus enabling the rendering of pass-through attributes only on the root element of the markup.

          Show
          Mircea Toma added a comment - Modified DOMREsponseWriter to render only data-* pass-through attributes. Modified all ACE component renderers to pass in the component to the ResponseWriter.startElement method only when the element owning the client ID is written out thus enabling the rendering of pass-through attributes only on the root element of the markup.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: