Announcement

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

    Receiving cancel on custom DateChooser

    I am creating/extending my own class off of a DateChooser. I enable the "cancel" operation. Upon the user pressing "cancel", I would like to get an event/notification in my class. I overrode the "cancelClick" method, but it appears the base class's "cancelClick" is always called... not mine.

    What is the best way to know when the user presses "cancel"?

    Thanks.

    #2
    That's a bug as well as todayClick(). You could overrite it with JSNI, instead of setting it to a blank function like I did below, create your own function and make it point to that function
    Code:
    public void onModuleLoad() {
      myDateChooser d = new myDateChooser();
      d.callMe();
      d.setShowCancelButton(true);
      d.draw();
    }
    		  
    public class myDateChooser extends DateChooser {
      public native void callMe() /*-{
        var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();
        self.cancelClick = function() { }
       }-*/;
    };

    Comment

    Working...
    X