2011-06-15 31 views

回答

8

添加Window Closing Handler

HandlerRegistration registration = Window.addClosingHandler(new ClosingHandler() { 
    void onWindowClosing(ClosingEvent event) { 
     // call the server, or whatever 
    } 
}); 

编辑

HandlerRegistration用于注销Handler如果你不需要它了。