ICEfaces
  1. ICEfaces
  2. ICE-10430

Components should only render "required" attribute into browser DOM if specified as HTML5 passthrough attribute

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: EE-4.0.0.GA, 4.1
    • Labels:
      None
    • Environment:
      ICEfaces 4.0 ACE and MOBI Components
    • Assignee Priority:
      P1

      Description

      As of JSF 2.2, components should avoid rendering their "required" attribute into the client browser DOM UNLESS "p:required" is specified, where "p:" is the prefix for the JSF 2.2. HTML5 Passthrough namespace (xmlns="http://xmlns.jcp.org/jsf/passthrough").

      In ICEfaces 4.0, ACE and MOBI components with "required='true'" specified render "required='true'" into the corresponding input element in the browser DOM which signals to the HTLM5 browser to use HTML5 client validation to validate the element. This prevents the submit of the form from occurring, and instead renders the browser's validation error message, which is not what JSF application developers would expect. This is an unexpected an incorrect behaviour.

      Instead, the components should only render the "required='true'" attribute into the input element in the browser DOM when specified using the "p:" passthrough attribute prefix, which signals to the component that the application would like to leverage HTML5 client-side validation in this case.

      Respecting the two different syntaxes allows the default JSF validation behaviour to work as expected even on HTML5 browsers, while still providing the optional ability for an application developer to specify that they want the client-side validation behavior (in which case it is expected that they understand the implications, etc.).




        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #44004 Tue Feb 03 17:21:43 MST 2015 art.zambrano ICE-10430 reverted fix to keep 'required' attribute in textarea element
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/richtextentry/ckeditor/ckeditor.js
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/richtextentry/readme.txt
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #43992 Mon Feb 02 16:09:20 MST 2015 art.zambrano ICE-10430 deleted code that removed the 'required' attribute from underlying textarea element
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/richtextentry/ckeditor/ckeditor.js
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/richtextentry/readme.txt
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #43977 Thu Jan 29 12:00:03 MST 2015 judy.guglielmin ICE-10430 and ICE-10433 first support of jsf 2.2 passthrough attribute library and ensuring the required and requiredMessage of UIInput is functional for these components. As well, deprecate any attributes on the components used for existing html5 attribute support.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryMeta.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/util/PassThruAttributeWriter.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/TextAreaEntryMeta.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/combobox/ComboBoxMeta.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/combobox/ComboBoxRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntry.java

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: