Reputation: 5072
is there a possibility to notify a listener when a ZK component is destroyed or detached?
I want different composer of components communicate via an event queue. In order to do this I subscribe listeners for these components to the event queue. Now I need to know when a component or its composer is destroyed in order to unsubscribe its listener.
Thanks
Upvotes: 2
Views: 1506
Reputation: 2017
Yes, you can implement UiLifeCycle.
Documentation: http://books.zkoss.org/wiki/ZK_Configuration_Reference/zk.xml/The_listener_Element/The_org.zkoss.zk.ui.util.UiLifeCycle_interface
Upvotes: 6