OpenWGA 7.7 - JavaScript reference

WGA.portlet
Method :

WGA.portlet.registerObject(portletKey, jsObject)

On object WGA.portlet
Usage Attaches an object to the current instance of a portlet
Description

This method is helpful to register objects whose lifetime should be bound to the current instance of a WebTML portlet. Reloading and unloading of the portlet should destroy it.

Therefor WGA calls a method "destroy()" on every registered object when the current portlet instance is removed. By that method the object has the opportunity to "clean itself up". This is often used to destroy UI components that are built for an individual portlet instance.

Parameters

portletKey (String):

Key of the portlet to bind the object to

jsObject (JavaScript object):

Any JavaScript object with a method destroy() to clean itself up.