Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8, 1.8.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
Description
-
Hide
- Case8296Example.war
- 5.34 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/.../example/TestBean.class 2 kB
- WEB-INF/faces-config.xml 0.9 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/backport-util-concurrent.jar 343 kB
- WEB-INF/lib/commons-beanutils.jar 113 kB
- WEB-INF/lib/commons-collections.jar 162 kB
- WEB-INF/lib/commons-digester.jar 104 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/commons-logging.jar 30 kB
- WEB-INF/lib/icefaces-comps.jar 1.91 MB
- WEB-INF/lib/icefaces.jar 1.05 MB
- WEB-INF/lib/jsf-api.jar 350 kB
- WEB-INF/lib/jsf-impl.jar 816 kB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/web.xml 3 kB
- index.jsp 0.1 kB
- main.jspx 1 kB
- page.jspx 0.7 kB
-
- Case8296Example.zip
- 17 kB
- Arran Mccullough
-
- screenshot-1.jpg
- 64 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
After reviewing the customer's requirements and the general working of the ice:selectInputDate component it seems we need to make the following changes to avoid user-confusion when using this component to enter both dates and times:
1. Modify the component so that the inputText field associated with it doesn't update it's values as the user selects items in the popup. The inputText field should only be updated once the user closes the popup (and the edited/selected value is applied). This avoids confusion that can occur when the user sees the date and time values changing dynamically in the inputText field as they make selections, and then submit the form without first closing the calendar popup (and applying the changed values), thinking the updated values will be applied, but they are not (at least not prior to the initial submit).
2. Add a new attribute called "showApplyButton" (boolean, default=false) to the component. When "showApplyButton=false" (default), the popup behavior is the same as it is now such that clicking anywhere off the popup, or clicking the "X" button will both close the popup and apply the selected date-time value. Similarly, when "showApplyButton=true" a button appears at the bottom of the popup with the "Apply" label (from the resources file, of course). When the user clicks the apply button, it closes the popup and applies the selected value (the same action that clicking the "X" button to hide the popup, or clicking anywhere off the popup does now). However, when "showApplyButton=true" the popup should not close automatically when the user clicks off of it, and closing it by clicking the "X" icon should close the popup and not apply the edited value (cancels the edits).
Note that the behaviors exhibited by these additional component modalities must be described adequately in the component documentation.
If you change the selectInputDate JavaScript to close the popup onMouseDown instead of onClick it should fire BEFORE the button onClick does, thus resolving the issue.
It worked!
How to test:
Run the example. Select a date and click on the submit button. Look at the log output (see screenshot-1). The "Date Value:" should be the just-submitted date, not null or some previously submitted date.
("Comp Date:" is from getSubmittedValue(), which is always null because by that time the submitted value is already reinitialized to null.)
Verified with success on trunk revision 19164
Tested on: Tomcat6.0, FF3.5 and IE7
Test app committed to repo\qa\trunk\Regression\ICE-4584
This is the expected behavior of the component. Since we don't want the component to be firing value-change events for every selection change on a sub-section of the total date+time entry, we wait until the user has completed entering all the fields and confirms their entry by closing the popup (by clicking off the popup or clicking the "X" button) to submit the changed entry.
It might be clearer if we added a set of "OK / Cancel" buttons to the popup (or check + "X") so the user sees they need to confirm the entry, although they will quickly learn the correct behavior when they use it.