OpenWGA 7.7 - JavaScript reference
WGA.eventMethod :
WGA.event.addListener(pKey, eventName, f)
On object | WGA.event |
Usage | Listen for portlet events of the given name |
Description |
This method registers a JavaScript function which will get called when the portlet event is fired. This function is called with an "event object" as parameter. 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. |
Parameters |
pKey (String): eventName (String): f (JavaScript Function): |
Writable | False |
Return value | none |
Examples |
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"/> <script>
</script> </tml:form> |