0

Window cleanup

asked 2008-12-16 18:44:59 +0800

ansancle gravatar image ansancle
317 9

I need to know when a user browses away from my window so I can perform internal cleanup. I have tried adding a desktop listener, using a UILifeCycle listener, a ComponentCtrl, and just about everything else that looks like it could tell me when the user leaves a page without explicitly clicking something that tells me they are leaving.
I do get the DesktopCleanup.cleanup callback which tells me the name of the last page, but I don't see a way to get a handle to the specific instance.

Otherwise I have failed to ever get a callback when somebody leaves my page - they can do this by clicking on one of several buttons or by simple using back buttons or just going to a new URL. I am using a GenericForwardComposer to handle all of my callbacks from the .zul page.

Can someone please point me to a sample for how to get a callback when a Window is no longer visible (onClose is not called since nobody clicked a "close" button). I tried onHide but that doesn't work - I think since nobody calls setVisible(false).

Thanks
-Andrew

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2008-12-17 00:37:06 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

See this discussion:

http://zkoss.org/forum/index.zul#path=listComment;discussionId=6517;categoryId=14

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2008-12-16 18:44:59 +0800

Seen: 214 times

Last updated: Dec 17 '08

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