Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.2, 1.7DR#2
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Win XP SP2, component-showcase
-
ICEsoft Forum Reference:
Description
Some comments in the JForum posting, as well as comments by Sheng Gu in ICE-1343 led me to investigate ice:selectInputDate. Here are the issues that I found. I'm putting these in a single Jira because I think it'll just be a huge hassle trying to address and commit these issues separately.
1. Can't clear out the text field to make no date selected. Select a date, and see that it validates, and is set into the bean. Then go clear out the text field, and tab away. It gets a null submittedValue, but the value does not become null, and the bean does not get the null value.
2. If you try to implement a Cancel button by setting immediate="true" on it, and having its actionListener null out values in the bean, it won't work with selectInputDate, because clicking on the button will also submit the form, and cause a series of interactions that will result in the date existing again. Amusingly enough, it will work with imediate="false".
1. Can't clear out the text field to make no date selected. Select a date, and see that it validates, and is set into the bean. Then go clear out the text field, and tab away. It gets a null submittedValue, but the value does not become null, and the bean does not get the null value.
2. If you try to implement a Cancel button by setting immediate="true" on it, and having its actionListener null out values in the bean, it won't work with selectInputDate, because clicking on the button will also submit the form, and cause a series of interactions that will result in the date existing again. Amusingly enough, it will work with imediate="false".
#1 Fixed.
I also made it so that when you click on a date in the popup calendar, it will set the focus on the button you just clicked, and not the selectInputDate's input text field, since the input text field uses an onblur handler, so if you then click anywhere else it would have submitted the form again, redundantly.
#2 This is just how JSF works. After getting rid of the needless update from the onblur, I realised that it's doing what it should.
Trunk: Subversion 15150
icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
ICEfaces 1.6.2 Branch: Subversion15151
icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java