-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, all, I have encountered one interesting question about "DesktopCleanup"
There are two ways to do something after closing the browser:
public class MyDesktopCleanup implements DesktopCleanup {
public void cleanup(Desktop arg0) throws Exception {
System.out.println("Close browser======");
}
}
zk.xml: listener description: MyDesktopCleanup listener-class com.text.MyDesktopCleanup
or, you can do this: ===============
@Override
public void doAfterCompose(Component comp) throws Exception {
// TODO Auto-generated method stub
super.doAfterCompose(comp);
comp.getDesktop().addListener(new DesktopCleanup() {
public void cleanup(Desktop desktop) throws Exception {
System.out.println("Close browser======");
}
});
}
I have test these two methods in Chrome and firefox, they both operated well and print :"Close browser======". But if I run this in IE 9, something interesting happened: after running the web project and I open IE 9 to access the web page. Before closing IE, I do nothing, then the DesktopCleanup is called and it is right. However, if I do something like upload files on web page, after closing IE, the DesktopCleanup would be not called.
So, how can I resolve this problem ? Thank you very much!
Asked: 2015-03-11 07:16:29 +0800
Seen: 6 times
Last updated: Mar 11 '15
How to stop combining commands in an ajax call ?
zk developmet is esay [closed]
Need help with scrolling horizontal tabs in Right-to-Left (Arabic)
Create tab dynamically, multitab application
Radio button value change on database value
How to implement, each user has its own session timeout time