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
used built in conversion to get around this.