Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.1
-
Component/s: ACE-Components, MOBI-Components
-
Labels:None
-
Environment:ICEfaces 4
-
Assignee Priority:P2
-
ICEsoft Forum Reference:
-
Affects:Documentation (User Guide, Ref. Guide, etc.)
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.
While, the native reset button not only clears input elements but also resets those elements to the values with which they were loaded initially, in the case of our components the notion of an original value is not straight-forward, since our components' values can be programmatically updated, and also ajax requests can save components' values multiple times in a user session. This makes it unclear to determine what really are the original components' values.
This JIRA is to investigate and ultimately provide an easy to use mechanism for clearing 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 clearing the components in a form, but ultimately this JS function would be integrated into a new "clear" mode for the existing ace:pushButton component (under a separate JIRA -ICE-10115).
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.
While, the native reset button not only clears input elements but also resets those elements to the values with which they were loaded initially, in the case of our components the notion of an original value is not straight-forward, since our components' values can be programmatically updated, and also ajax requests can save components' values multiple times in a user session. This makes it unclear to determine what really are the original components' values.
This JIRA is to investigate and ultimately provide an easy to use mechanism for clearing 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 clearing the components in a form, but ultimately this JS function would be integrated into a new "clear" mode for the existing ace:pushButton component (under a separate JIRA -
Issue Links
- blocks
-
ICE-10912 ace:selectMenu, inField label is not restored when clearing the component
- Closed
-
ICE-9501 ACE javascript components reseting when reset button pressed
- Closed
-
ICE-10898 Add "Reset" capability to ACE, MOBI components
- Closed
-
ICE-10115 Add a new "clear" mode to the ace:pushButton, ace:linkButton
- Closed
Created a simple test to verify the current behaviour of the ACE input components when "resetted" using a typical HTML form reset:
Results show the input field value being cleared successfully on the following components:
The following components input field values were unaffected by the HTML reset: