添加窗口关闭处理程序:
HandlerRegistration registration = Window.addClosingHandler(new ClosingHandler() {
void onWindowClosing(ClosingEvent event) {
// call the server, or whatever
}
});
Run Code Online (Sandbox Code Playgroud)
编辑
在HandlerRegistration使用注销Handler,如果你不需要它了.
| 归档时间: |
|
| 查看次数: |
3128 次 |
| 最近记录: |