public abstract class ClientBehaviorRenderer extends java.lang.Object
A ClientBehaviorRenderer produces
the client-side script that implements a
logic. It can also enqueue server-side
BehaviorEvents that may be
processed later by event listeners that have registered an interest.
ClientBehaviorRenderer instances will be instantiated as
requested during the rendering process, and will remain in existence for the
remainder of the lifetime of a web application. Because each instance
may be invoked from more than one request processing thread simultaneously,
they MUST be programmed in a thread-safe manner.
|Constructor and Description|
|Modifier and Type||Method and Description|
Return the script that implements this ClientBehavior's client-side logic.
public java.lang.String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior)
Return the script that implements this
ClientBehavior's client-side logic. The default implementation returns
ClientBehaviorRenderer.getScript() implementations are allowed to return null to indicate that no script is required for this particular getScript() call. For example, a ClientBehaviorRenderer implementation may return null if the associated ClientBehavior is disabled.
ClientBehaviorContextthat provides properties that might influence this getScript() call. Note that ClientBehaviorContext instances are short-lived objects that are only valid for the duration of the call to getScript(). ClientBehaviorRenderer implementations must not hold onto references to ClientBehaviorContexts.
behavior- the ClientBehavior instance that generates script.
public void decode(FacesContext context, UIComponent component, ClientBehavior behavior)
During decoding, events may be enqueued for later processing
(by event listeners who have registered an interest), by calling