Class AjaxHandler

All Implemented Interfaces:
AttachedObjectHandler, BehaviorHolderAttachedObjectHandler, FaceletHandler

public final class AjaxHandler
extends TagHandlerImpl
implements BehaviorHolderAttachedObjectHandler

Enable one or more components in the view to perform Ajax operations. This tag handler must create an instance of AjaxBehavior using the tag attribute values.

The events attribute for this tag that can be a ValueExpression must be evaluated at tag execution time since the event name is used in the process of Behavior creation.
If this tag is nested within a single ClientBehaviorHolder component:

Check for the existence of the Ajax resource by calling UIViewRoot.getComponentResources(). If the Ajax resource does not exist, create a UIOutput component instance and set the renderer type to jakarta.faces.resource.Script. Set the the following attributes in the component's attribute Map: library with the value "jakarta.faces" and name with the value "jsf.js". Install the component resource using UIViewRoot.addComponentResource() and specifying head as the target argument.

If this tag has component children, add the AjaxBehavior to AjaxBehaviors by calling AjaxBehaviors.pushBehavior(jakarta.faces.context.FacesContext, jakarta.faces.component.behavior.AjaxBehavior, java.lang.String). As subsequent child components that implement the ClientBehaviorHolder interface are evaluated this AjaxBehavior instance must be added as a behavior to the component.

Version:
$Id: AjaxHandler.java 5369 2008-09-08 19:53:45Z rogerk $