-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I have Implemented DeskTop CleanUP like below code.cleanup() method is not calling when tab closed or browser closed in fire fox .It is working fine in IE 8 .I have not tested with crome but i am not sure it works .And it is calling when i select undo-Reopen Tab .I did not get why it is calling in case fire fox oppositely means reopening tab instead of closing the tab . How to make it browser independent DeskTopCleanUP Impl .Your reply has lot of worth .
Thnak you
Pavan Kumar
<description>Desktop cleanup</description>
<listener-class>
com.pennant.webui.util.UserDesktopCleanup
</listener-class>
</listener>
public class UserDesktopCleanup implements DesktopCleanup{
/**
*
*/
private static final long serialVersionUID = 6585204252879222073L;
@Override
public void cleanup(Desktop arg0) throws Exception {
System.out.println("Abnormal Browser distrubed");
if(arg0.getRequestPath().equals("/pages/index.zul")){
Authentication currentUser = SecurityContextHolder.getContext().getAuthentication();
if(currentUser!=null && !currentUser.getName().equals("anonymousUser")){
WebAuthenticationDetails details = (WebAuthenticationDetails)currentUser.getDetails();
SessionUtil.getActiveDeskTopsMap().put(currentUser.getName()+"-"+details.getSessionId(),false);
}
}
}
}
Asked: 2012-10-29 04:54:40 +0800
Seen: 77 times
Last updated: Oct 29 '12