0

DeskTop CleanUp Impl for FireFox and Other Browsers

asked 2012-10-29 04:54:40 +0800

ommpavan gravatar image ommpavan
231

updated 2012-10-29 05:05:14 +0800

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);
}
}
}
}

delete flag offensive retag edit
Be the first one to reply this discussion!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2012-10-29 04:54:40 +0800

Seen: 77 times

Last updated: Oct 29 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More