Reputation: 2665
Does Wicket notifies a Panel when this Panel is removed/replaced in the Page?
I add JavaScript (initialization code) in Panel's constructor and need to release some resources when Panel is removed.
Upvotes: 1
Views: 211
Reputation: 17533
There is also PubSub system at the client side where you can do what you need. See https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax#WicketAjax-GlobalAjaxcalllisteners and event '/dom/node/removing'.
Upvotes: 1
Reputation: 2673
Later versions of Wicket (1.4.0+) have Component#onRemove() method, which is needed to notify the component that it's being removed from the component hierarchy.
Upvotes: 2