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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: