Announcement

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

    Cannot Override Window CloseClickHandler

    Hey everyone, I have a issue after updated smartgwt to version 12.1 from 4.0.
    I can't override the CloseClickHandler, it will always destroy the window even i didn't call destroy().
    I can override it when i am using smartgwt 4.0.
    My code below:

    this.addCloseClickHandler(new CloseClickHandler() {
    @Override
    public void onCloseClick(CloseClickEvent event) {

    SC.confirm("Confirm.close", new BooleanCallback() {
    public void execute(Boolean value) {
    if (Boolean.TRUE.equals(value)) {
    window.this.destroy();
    }
    }
    });

    }
    });

    Thanks a lot:)

    #2
    Try event.cancel as 1st line in onCloseClick().

    Best regards
    Blama

    Comment


      #3
      Originally posted by Blama View Post
      Try event.cancel as 1st line in onCloseClick().

      Best regards
      Blama
      Dear Blama
      Thanks a lot! It is working~ :o

      Comment

      Working...
      X