OpenWGA 7.10 - JavaScript reference

WGA.event
Method :

WGA.event.fireEvent(name, source, params)

On object WGA.event
Usage

Fires a client side portlet event with the given name.

Description

This method can be used to fire a portlet event from the browser client. The WebTML page will behave the same way as if a WebTML portlet fired a portlet event from the server side.

Parameters given to this event are only available to client-side listeners, not to serverside event scripts.

Use the method WGA.event.addListener to listen to a portlet event on the client side.

Parameters

eventname (String):
The name of the event

source (String):
who fires the event (typically the portlet key)

params (Object)
optional event parameter

Return value void
Examples

Fire an event with name "address-selected" with some address data as event parameters:

WGA.event.fireEvent("address-selected", "<tml:script expression="portlet.portletkey"/>", {

firstname: "Mick",

lastname: "Jagger"

})