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

        Judy Guglielmin created issue -
        Judy Guglielmin made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Judy Guglielmin [ judy.guglielmin ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28400 Mon Mar 19 13:43:30 MDT 2012 judy.guglielmin MOBI-190 built in conversion in component for mobi:timeSpinner and update of mobitest as well as mobileshowcase. Modifications only apply to implementation of useNative which iOS5 and Blackberry are capable of using. If jsf converters are required (beyond what component is doing with built-in conversion for this option, then custom jsf converters will have to be implemented in apps simliar to what component Renderer is doing for useNative).
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/components/tests/mobitest/src/main/webapp/inputComponents/timeSpinner.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/components/tests/mobitest/src/main/java/org/icefaces/mobile/DateBean.java
        Commit graph MODIFY /icemobile/trunk/icemobile/samples/mobileshowcase/src/main/webapp/WEB-INF/includes/examples/input/date-example.xhtml
        Commit graph MODIFY /icemobile/trunk/icemobile/components/component/src/org/icefaces/mobi/component/timespinner/TimeSpinnerRenderer.java
        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.
        Judy Guglielmin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Migration made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: