Details
-
Type:
New Feature
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: EE-4.1.0.RC1, EE-4.1.0.GA, 4.2.BETA, 4.2
-
Component/s: ACE-Components, MOBI-Components
-
Labels:None
-
Environment:ICEfaces 4
-
Assignee Priority:P1
-
ICEsoft Forum Reference:
Description
A useful feature for an application is to provide a "Reset" button on a form to allow the use to reset all form fields to their original states, prior to any user modifications.
Historically, the HTML input type="reset" was used for this function (e.g. " <input type="reset" value="Reset!">"). However, with the more advanced and complex components provided by ACE and MOBI, the basic form-field reset capability provided by the HTML input technique is no longer sufficient to ensure proper value resetting.
This JIRA is to investigate and ultimately provide an easy to use mechanism for resetting all components in a form reliably, whether they be ACE, MOBI, or "h:" / standard JSF components.
Note that this JIRA would likely provide a JavaScript-based mechanism for resetting the components in a form, but ultimately this JS function would be integrated into a new "reset" type for the existing ace:pushButton component (under a separate JIRA -ICE-10899).
Historically, the HTML input type="reset" was used for this function (e.g. " <input type="reset" value="Reset!">"). However, with the more advanced and complex components provided by ACE and MOBI, the basic form-field reset capability provided by the HTML input technique is no longer sufficient to ensure proper value resetting.
This JIRA is to investigate and ultimately provide an easy to use mechanism for resetting all components in a form reliably, whether they be ACE, MOBI, or "h:" / standard JSF components.
Note that this JIRA would likely provide a JavaScript-based mechanism for resetting the components in a form, but ultimately this JS function would be integrated into a new "reset" type for the existing ace:pushButton component (under a separate JIRA -
r47057: added "reset" capability to ACE, MOBI components
I had to add various mechanisms to solve specific situations, including a special flag to avoid applying the general clear algorithm to some elements; finding ways for lazy load components to register their default values without having to be initialized; sending additional context information for dealing with single and multiple radiobuttons and checkboxbuttons, and covering the case where the clear button is clicked first and then the reset button.
Testing notes: The testing matrix will be a little involved because of all the possible scenarios and configurations. Please test using the following criteria and combinations of, as feasible.
Note that for ace:fileEntry the reset action is the same as the clear action, since the component can't be loaded with preselected files to download.