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

          Ken Fyten created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          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").

          As of 4.0, any ACE or MOBI component with "require='true'" specified would render "required='true'" into 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.



          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 syntax's correctly 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.).




          Ken Fyten made changes -
          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 syntax's correctly 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.).




          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.).




          Ken Fyten made changes -
          Assignee Judy Guglielmin [ judy.guglielmin ]
          Fix Version/s EE-4.0.0.GA [ 11171 ]
          Assignee Priority P1 [ 10010 ]
          Ken Fyten made changes -
          Link This issue blocks ICE-10434 [ ICE-10434 ]
          Judy Guglielmin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ken Fyten made changes -
          Assignee Judy Guglielmin [ judy.guglielmin ] Arturo Zambrano [ artzambrano ]
          Arturo Zambrano made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 4.1 [ 11375 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: