Interface ClientBehavior

All Superinterfaces:
Behavior
All Known Implementing Classes:
AjaxBehavior, ClientBehaviorBase, RetargetedAjaxBehavior

public interface ClientBehavior extends Behavior

ClientBehavior is the base contract for Behaviors that attach script content to client-side events exposed by ClientBehaviorHolder components. Instances of ClientBehavior may be attached to components that implement the ClientBehaviorHolder contract by calling ClientBehaviorHolder.addClientBehavior(java.lang.String, jakarta.faces.component.behavior.ClientBehavior). Once a ClientBehavior has been attached to a ClientBehaviorHolder component, the component calls getScript(jakarta.faces.component.behavior.ClientBehaviorContext) to obtain the behavior's script and the component wires this up to the appropriate client-side event handler. Note that the script content returned by this method is always in-line script content. If the implementing class wants to invoke functions defined in other script resources, the implementing class must use the ResourceDependency or ResourceDependencies annotation.

Since:
2.0