Details
Description
It's possible in certain portal environments like Liferay to dynamically remove a portlet from a portal page. When this occurs, there is currently no way for the ICEfaces framework to properly dispose of the resources associated with that view. Liferay (an possibly other portal containers) does provide a mechanism to listen for when a portlet is closed which would allow a developer to call an ICEfaces API to dispose of the associated view.
Note that this must be a client-side JS API.
Note that this must be a client-side JS API.
Add public method that notifies server and then disposes the view bound bridge instance.
Here's an example how the public method can be used:
<script id="id1234">
{ 'id1234'.asExtendedElement().findBridge().disposeAndNotify(); }Liferay.bind('closePortlet', function()
);
</script>
The 'script' element needs to be inserted somewhere in the portlet content so that it can find the bridge instance.