java - How to track Window close of SmartGwt -


i developing sdi web app using smartgwt. in main window, want popup window, when button clicked. when popup window closed, main window not able trap event. there way that?

ibutton showpopupbutton = new ibutton(); showpopupbutton.addclickhandler(new clickhandler() {     public void onclick(clickevent event) {         window popup = new window();         popup.show();         sc.say("the popup closed"); // unexpect: shows after popup shown.     } }); 

currently, can declare argument booleancallback constructor, when popup window going closed, should call callback function.

i have solution:

ibutton showpopupbutton = new ibutton(); showpopupbutton.addclickhandler(new clickhandler() {     public void onclick(clickevent event) {         window popup = new mywindow(new booleancallback() {              public void execute(boolean value) {                  sc.say("the popup closed");              }         });         popup.show();     } }); 

but if else writes plugin me , not using such "callback function" constructor, how track window close event? tried register visiblitychangedhandler popup window, not work.

window closing handler event catch closing event, try

window.addwindowclosinghandler(new closinghandler() {              @override             public void onwindowclosing(closingevent event) {               }         }); 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -