OpenWGA 7.6 - JavaScript reference


Object:

WGA.event

Description

The Object WGA.event is used to handle client side WebTML portlet events. This is a way to use portlet events if the client JavaScript code needs to work with them.

A portlet may fire an event using the method WGA.event.fireEvent() while other portlets may register event listeners by using WGA.event.addListener().

Event listeners are automatically removed when a portlet is refreshed. This is true also for all child portliest of a portlet.

Properties and methods
Name Purpose
WGA.event.addListener(pKey, eventName, f) Listen for portlet events of the given name
WGA.event.fireEvent(name, source, params)

Fires a client side portlet event with the given name.

WGA.event.removeListeners(pkey)

Removes all event listeners of a portlet and all its child portlets

This method is called internally when a portlet is refreshed and should normally not called directly by the designer.