ICEfaces
  1. ICEfaces
  2. ICE-10876

mobi:dateTimeSpinner validation fails in showcase

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: EE-4.1.0.RC1, EE-4.1.0.GA, 4.2.BETA, 4.2
    • Labels:
      None
    • Environment:
      Tomcat 7, all browsers, showcase-mobile. Issue can be reproduced with the ICEfaces 4 public demo
    • Assignee Priority:
      P2
    • Affects:
      Compatibility/Configuration

      Description

      The year validation in the mobi Date and Time demo does not work properly.Typing an invalid year, as example "0015", opening the component and trying to adjust/correct the invalid year via the "+" or "-" buttons, triggers a JS error in desktop browsers.
      TypeError: b.toDateString is not a function
      Also, the date is not rendered in the component header, see attached screen shot.
      While the js console error is easy to reproduce, the missing header in the dateTimeEntry requires specific steps to reproduce.
      This can be reproduced while using the icefaces public demo.
      1.) Go to http://icefaces-showcase.icesoft.org/showcase-mobile.jsf and navigate to mobi Date and Time demo.
      2.) Change the Use Native control to OFF
      3.) Click inside the Date entry and edit year to "0015".
      4.) Click on the Date thumbnail and open component -> the date is displayed incorrectly as "Mon Nov 30 2015".
      4.) Click the + or - buttons to change the year -> "b.toDateString is not a function" JS error appears in the browser console.
      5.) While having the Date popup open, refresh using F5, then click the date thumbnail again to open the Date component. The date component opens up, without any date in the header
      1. header.png
        58 kB
      2. time.PNG
        16 kB

        Issue Links

          Activity

          Hide
          Judy Guglielmin added a comment -

          see last comment.

          Show
          Judy Guglielmin added a comment - see last comment.
          Hide
          Liana Munroe added a comment - - edited

          Verified showcase demo issue ICEfaces EE-4.1 r48677. Tomcat 8, IE 11, FF 43, Chrome 50, android 6.0.1, ios 9.3.1.
          It seems that with this latest fix the required attribute no longer functions with the mobi:dateSpinner. No messages are rendered when trying to submit an empty date. This can be demonstrated with the QA test app /dateSpinnerDynAttribute.jsf found at
          http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/dateSpinner.
          Open the application, select rendered and required, then submit the field with no value. Prior to the last commit for this JIRA a required message was shown, now it no longer appears. The required attribute is not seen in the browser console when inspecting the markup.

          Show
          Liana Munroe added a comment - - edited Verified showcase demo issue ICEfaces EE-4.1 r48677. Tomcat 8, IE 11, FF 43, Chrome 50, android 6.0.1, ios 9.3.1. It seems that with this latest fix the required attribute no longer functions with the mobi:dateSpinner. No messages are rendered when trying to submit an empty date. This can be demonstrated with the QA test app /dateSpinnerDynAttribute.jsf found at http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/dateSpinner . Open the application, select rendered and required, then submit the field with no value. Prior to the last commit for this JIRA a required message was shown, now it no longer appears. The required attribute is not seen in the browser console when inspecting the markup.
          Hide
          Mircea Toma added a comment -

          In regard to useNative=“true”option:- uses onchange attribute with jsf call. Problem is that when user presses enter a “keydown” shows up in the network request. When I code a “onkeydown” attribute, it fires unless an enter key is pressed. The network shows an onkeydown being submitted on the form, but the js function is not called. The bridge just submits it with a “keydown” execute=“@all” render=“@all” when you have focus on the input field and hit enter, the form submits and this is the result (but the onkeypress is not fired). ClientValidation must have already dealt with this I am thinking . :

          To avoid having the bridge capture the 'keydown' event the callback function registered by the component will need to cancel the event bubbling so that the 'keydown' event does not reach the form and thus not trigger the submit.

          Show
          Mircea Toma added a comment - In regard to useNative=“true”option:- uses onchange attribute with jsf call. Problem is that when user presses enter a “keydown” shows up in the network request. When I code a “onkeydown” attribute, it fires unless an enter key is pressed. The network shows an onkeydown being submitted on the form, but the js function is not called. The bridge just submits it with a “keydown” execute=“@all” render=“@all” when you have focus on the input field and hit enter, the form submits and this is the result (but the onkeypress is not fired). ClientValidation must have already dealt with this I am thinking . : To avoid having the bridge capture the 'keydown' event the callback function registered by the component will need to cancel the event bubbling so that the 'keydown' event does not reach the form and thus not trigger the submit.
          Hide
          Judy Guglielmin added a comment -

          rev 48682 for required validation message added to component, see last comment.

          Show
          Judy Guglielmin added a comment - rev 48682 for required validation message added to component, see last comment.
          Hide
          Liana Munroe added a comment -

          Verified required attribute functioning again. ICEfaces EE-4.1 r48686. Tomcat 8

          Show
          Liana Munroe added a comment - Verified required attribute functioning again. ICEfaces EE-4.1 r48686. Tomcat 8

            People

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

              Dates

              • Created:
                Updated:
                Resolved: