ICEmobile
  1. ICEmobile
  2. MOBI-190

timespinner is not encoding value correctly in useNative with iOS5

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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);

                  }

        Activity

        Hide
        Judy Guglielmin added a comment -

        used built in conversion to get around this.

        Show
        Judy Guglielmin added a comment - used built in conversion to get around this.

          People

          • Assignee:
            Judy Guglielmin
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: