Details
-
Type: Improvement
-
Status: Closed
-
Priority: 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:
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).
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
- blocks
-
ICE-10201 ace:textEntry - requiredMessage fails to render when using a submit button
- Closed
Activity
Ken Fyten
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 4.0 [ 11382 ] |
Ken Fyten
made changes -
Affects | Documentation (User Guide, Ref. Guide, etc.),Compatibility/Configuration [ 10003, 10002 ] |
Ken Fyten
made changes -
Assignee | Mircea Toma [ mircea.toma ] |
Ken Fyten
made changes -
Workaround Description |
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} |
|
Workaround Exists | Yes [ 10007 ] |
Ken Fyten
made changes -
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Won't Fix [ 2 ] |
This could take the form of a config. parameter and also an icecore:config attribute .