ICEfaces
  1. ICEfaces
  2. ICE-10241

Add ability to disable HTML5 Browser "Please fill out this field." tooltips.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0
    • Fix Version/s: 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces w/ HTML5 browsers.
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      The normal submit of the form is blocked by the HTML5 _required=true_ attribute set on the input element. Since ICEfaces captures the actual _submit_ event to issue an AJAX request the submit is not triggered.

      To workaround this client side validation the submit button can have an f:ajax facet thus forcing a submit that directly invokes the AJAX request:
      {code}
              <h:commandButton id="submit" type="submit" value="Submit">
                  <f:ajax render="@all" execute="@all"/>
              </h:commandButton>
      {code}
      Show
      The normal submit of the form is blocked by the HTML5 _required=true_ attribute set on the input element. Since ICEfaces captures the actual _submit_ event to issue an AJAX request the submit is not triggered. To workaround this client side validation the submit button can have an f:ajax facet thus forcing a submit that directly invokes the AJAX request: {code}         <h:commandButton id="submit" type="submit" value="Submit">             <f:ajax render="@all" execute="@all"/>         </h:commandButton> {code}

      Description

      When ICEfaces components with "required='true'" are rendered on browsers using HTML5 the "required" attribute is interpreted as the HTML5 "required" attribute. This results in the browser displaying a "Please fill out this field." tooltip (and aborting the submit) if you attempt a full Submit of the form without entering any values in the input component.

      While it can be seen as being a handy client-side enforcement of the "required" policy, it actually causes a few unexpected issues in JSF:

      * Aborts the entire submit, so any form components with validators (other than required=true) won't fire, and the user will only see the "Please fill out this field." tooltips for the required fields.
      * Prevents the application from presenting any defined "requiredMessage"s of it's own.
      * Results in the application having to localize the HTML5 error message in a manner completely different from the JSF component localizations.
      * Looks different from the standard component messages in terms styling and location, etc.

      This JIRA is to add a framework-level configuration to disable the built-in browser's HTML5 enforcement for "required=true", which should probably be the default as well (disabled).


       

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          This could take the form of a config. parameter and also an icecore:config attribute .

          Show
          Ken Fyten added a comment - This could take the form of a config. parameter and also an icecore:config attribute .
          Hide
          Ken Fyten added a comment -
          Show
          Ken Fyten added a comment - Also see: http://stackoverflow.com/questions/5392882/chrome-popup-please-fill-out-this-field for more information.
          Hide
          Ken Fyten added a comment -

          Marking won't fix as the workaround is sufficient in this case.

          Show
          Ken Fyten added a comment - Marking won't fix as the workaround is sufficient in this case.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: