Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.0 Williams
-
Fix Version/s: EE 1.0 RC1
-
Component/s: None
-
Labels:None
-
Environment:jsf 2 icefaces 3
Description
When selecting a date in timespinner component and using useNative="true" for any iOS5 device,
the value is not getting properly encoded for the native html5 markup and no date is displayed in the native widget.
Since all devices that will have this support may have differing formats, probably best to remove some of the built in convesion and use <f:convertDateTime>
for iOS5 that would be
<f:convertDateTime type="time" pattern="HH:mm" timeZone="#{date.timeZone}/>
on the <mobi:timeSpinner> component
this would mean changing
if (shouldUseNative(timeSpinner)) {
String inputValue = context.getExternalContext().getRequestParameterMap().get(clientId);
String twelveHrString = convertToTwelve(inputValue);
if (null != twelveHrString) {
timeSpinner.setSubmittedValue(twelveHrString);
}
....
I changed it to this:-
if (shouldUseNative(timeSpinner)) {
String inputValue = context.getExternalContext().getRequestParameterMap().get(clientId);
if (Utils.isIOS5()){
String twelveHrString = convertToTwelve(inputValue);
if (null != twelveHrString) {
timeSpinner.setSubmittedValue(twelveHrString);
}
} else { //assuming user is using converter with HH:mm value
timeSpinner.setSubmittedValue(inputValue);
}
the value is not getting properly encoded for the native html5 markup and no date is displayed in the native widget.
Since all devices that will have this support may have differing formats, probably best to remove some of the built in convesion and use <f:convertDateTime>
for iOS5 that would be
<f:convertDateTime type="time" pattern="HH:mm" timeZone="#{date.timeZone}/>
on the <mobi:timeSpinner> component
this would mean changing
if (shouldUseNative(timeSpinner)) {
String inputValue = context.getExternalContext().getRequestParameterMap().get(clientId);
String twelveHrString = convertToTwelve(inputValue);
if (null != twelveHrString) {
timeSpinner.setSubmittedValue(twelveHrString);
}
....
I changed it to this:-
if (shouldUseNative(timeSpinner)) {
String inputValue = context.getExternalContext().getRequestParameterMap().get(clientId);
if (Utils.isIOS5()){
String twelveHrString = convertToTwelve(inputValue);
if (null != twelveHrString) {
timeSpinner.setSubmittedValue(twelveHrString);
}
} else { //assuming user is using converter with HH:mm value
timeSpinner.setSubmittedValue(inputValue);
}
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #28400 | Mon Mar 19 13:43:30 MDT 2012 | judy.guglielmin | |
Files Changed | ||||
MODIFY
/icemobile/trunk/icemobile/components/tests/mobitest/src/main/webapp/inputComponents/timeSpinner.xhtml
MODIFY /icemobile/trunk/icemobile/components/tests/mobitest/src/main/java/org/icefaces/mobile/DateBean.java MODIFY /icemobile/trunk/icemobile/samples/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/input/date-example.xhtml MODIFY /icemobile/trunk/icemobile/components/component/src/org/icefaces/mobi/component/timespinner/TimeSpinnerRenderer.java |