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

          Ted Goddard created issue -
          Ted Goddard made changes -
          Field Original Value New Value
          Assignee Ken Fyten [ ken.fyten ]
          Ted Goddard made changes -
          Fix Version/s 3.4 [ 10770 ]
          Ken Fyten made changes -
          Issue Type Improvement [ 4 ] New Feature [ 2 ]
          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.
          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/
          Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
          Affects Version/s EE-3.3.0.GA [ 10572 ]
          Affects Compatibility/Configuration [ 10002 ]
          Assignee Priority P2 [ 10011 ]
          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 .
          Ken Fyten made changes -
          Link This issue depends on ICE-9681 [ 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.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #39249 Thu Dec 05 12:56:43 MST 2013 mircea.toma ICE-9436 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.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/flipswitch/FlipSwitchRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/simpleselectonemenu/SimpleSelectOneMenuRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/printer/PrinterRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/DataExporterRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/renderkit/CoreRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tooltip/TooltipRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/outputlist/OutputListItemRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/sliderentry/SliderEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/roweditor/RowEditorRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dialog/DialogRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/checkboxbutton/CheckboxButtonRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/splitpane/SplitPaneCoreRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/breadcrumbmenu/BreadcrumbMenuRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tableconfigpanel/TableConfigPanelRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/progressbar/ProgressBarRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/menubutton/MenuButtonRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/pushbutton/PushButtonRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/buttongroup/ButtonGroupRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/message/MessageRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/resizable/ResizableRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataview/DataViewRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/confirmationdialog/ConfirmationDialogRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/accordion/AccordionRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/radiobutton/RadioButtonRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/listcontrol/ListControlRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/growlmessages/GrowlMessagesRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/outputlist/OutputListItemsRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/linkbutton/LinkButtonRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/celleditor/CellEditorRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/selectmenu/SelectMenuRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/pagepanel/PagePanelRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/richtextentry/RichTextEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/maskedentry/MaskedEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/submitmonitor/SubmitMonitorRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/fileentry/FileEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dnd/DraggableRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/contextmenu/ContextMenuRenderer.java
          Ken Fyten made changes -
          Summary Support for JSF 2.2 HTML 5 features Support for JSF 2.2 HTML 5 passthrough attributes
          Ken Fyten made changes -
          Fix Version/s 4.0 [ 11382 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: