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
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
-
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Created a simple test to verify the current behaviour of the ACE input components when "resetted" using a typical HTML form reset:
<h:commandButton id="reset" value="Reset Form" type="reset" immediate="true" />
Results show the input field value being cleared successfully on the following components:
- ace:textEntry
- ace:autoCompleteEntry
- ace:comboBox
- ace:dateTimeEntry
The following components input field values were unaffected by the HTML reset:
- ace:textAreaEntry
- ace:selectMenu
- ace:simpleSelectOneMenu
- ace:maskedEntry
- ace:sliderEntry
- ace:checkboxButton
- ace:radioButton
Actually, it wasn't caused by a recent commit. It's just the way it has been working all the time. I suggested to add an empty string value in ICE-10900 to avoid validation errors. This is just the way it logically works.
We would have to introduce a special value to represent a state where the user hasn't interacted yet with the component, in order to show the inField label after clearing the form when there exists an empty string value, but perhaps it would be risky to do so at this moment.