Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Calendar width DataSource not fire event onHandleError() in month view

    Hi,
    I'am using SGWT Pro 6.1 released August 23, 2017

    I use com.smartgwt.client.widgets.calendar.Calendar width DataSource.

    My code:

    calendar.getDataSource().addHandleErrorHandler(new HandleErrorHandler() {

    @Override
    public void onHandleError(ErrorEvent event) {
    try {
    String msgError = event.getResponse().getErrors().get("error").toString();
    if(msgError!=null)
    SC.say(msgError);
    event.cancel();
    ....
    } catch (Exception e) {
    event.cancel();
    }
    }
    }) ;

    The event fire does not occur in the month view instead in the day or week view it works.

    Can you give me some help?

    Thanks a lot.

    #2
    We made a change that should address this for you, but neglected to update the thread before now - you can test the change in builds dated September 2 and later.

    Comment


      #3
      Hi,
      I'am using SGWT Pro 6.1 released December 16, 2017 and the error described above has returned.
      Can you give me some help?
      Thanks

      Comment


        #4
        Can you clarify that you're saying this *was* fixed, and is now broken again?

        Comment


          #5
          Yes,
          the event fire does not occur in the month view instead in the day or week view it works.
          I'am using SGWT Pro 6.1 released December 16, 2017

          Code:
          calendar.getDataSource().addHandleErrorHandler(new HandleErrorHandler() {
            @Override
            public void onHandleError(ErrorEvent event) {
              try {
                  String msgError = event.getResponse().getErrors().get("error").toString();
                  if(msgError!=null)   {
                      SC.say(msgError);
                      event.cancel();
                      ....
                  }    
              } catch (Exception e) {
                      event.cancel();
              }
            }
          }) ;

          Comment


            #6
            Can you show a standalone test-case we can run? This can include a clientOnly DS if necessary, and should cover which error you're expecting, how you're generating it, whether its from a DS add or update, etc.

            Comment


              #7
              Quick follow-up - we weren't able to reproduce any difference in behavior between Month and Week/Day views - however, we did notice that central error handling sometimes might not run - this depended on how the save that failed was being initiated, hence us asking for a runnable sample.

              We've made some changes for builds dated January 13 and later - central/custom error handling will now run for all failures, in all views, unless the Calendar completely handles the issue - that is, unless the failure was with validation *and* the Calendar applies the validation errors to a UI (the event dialog or editor).

              If you still see issues, please provide a standalone test-case and instructions for generating the situation you see.
              Last edited by Isomorphic; 14 Jan 2018, 21:51.

              Comment

              Working...
              X