<af:serverListener>

serverListener server listener

The serverListener tag is a declarative way to register a server-side listener that should be executed when a custom client event is fired. This tag will be ignored for any server-rendered components, as it is only supported for the rich client. The target method must return void and take one argument, a ClientEvent object.

To fire a custom event from the client, use the AdfCustomEvent.queue() Javascript method:

/**
* Convenience function for queueing an Custom event from a component.
* @param {AdfUIComponent} Component to queue the custom event on
* @param {String} the type of the event
* @param {Object} a set of parameters to include on the event. Reserved
* parameter names include "type" and "immediate".
* @param (boolean) whether the custom event is "immediate" - which will
* cause it to be delivered during Apply Request Values on the server,
* or not immediate, in which case it will be delivered during
* Invoke Application.
* @final
*/
AdfCustomEvent.queue = function(component, type, params, immediate) { ... }

Example:

This example will invoke the doCustomEvent() method on the server when a custom event of type "myCustomEvent" is sent to this component.