WGA.event.addListener(pKey, eventName, f)
|Usage||Listen for portlet events of the given name|
It is especially suited to catch portlet events that were already fired on the client side via WGA.event.fireEvent().
The event object has the following properties:
It is neccessary to assign the listener to a WebTML portlet of the current page. The registration code should be in the output code of this portlet, so the registration runs every time the portlet gets reloaded. The WGA portlet registry will register the event for that portlet and will remove it from the registry once this portlet gets reloaded or unloaded.
Script code adding a listener function which calls an WebTML AJAX action when an event fires.
<tml:form id="myform" source="portlet">
<tml:input type="hidden" name="key"/>