Register an AjaxBehavior instance on one or more UIComponents implementing the ClientBehaviorHolder interface. This tag may be nested witin a single component (enabling Ajax for a single component), or it may be "wrapped" around multiple components (enabling Ajax for many components).
The String value for ids
specified for execute and render may be specified as a search
expression as outlined in the JavaDocs for
UIComponent.findComponent(). The implementation
must resolve these ids as specified for
UIComponent.findComponent(). For example, consider
the following Facelets code.
When the button is pressed, panel_1, in form_1 will be re-rendered, along with panel_2 in form_2.
| Name | Required | Type | Description |
|---|---|---|---|
clearModel | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
|
Clear the model values as well when |
delay | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| If less than
delay milliseconds elapses between calls to
request() only the most recent one is sent and all other
requests are discarded. If this option is not specified, or if the
value of delay is the literal string |
disabled | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
|
A value of "true" indicates the AjaxBehavior should not be rendered. A value of "false" indicates the AjaxBehavior should be rendered. "false" is the default. |
event | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
|
A String or
ValueExpression (that evalulates to a String) identifying the type of event
the Ajax action will apply to. If specified, it must be one of the
events supported by the component the Ajax behavior is being applied to as per |
execute | false | jakarta.el.ValueExpression
(must evaluate to java.util.Collection)
|
Evaluates to
Collection<String>. This is a space separated list of
search expressions to
components that will participate in the "execute"
portion of the Request Processing Lifecycle. See the javadoc for
When nested within a composite component,
and the value contains or implies the keyword |
immediate | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
|
If "true" behavior events generated from this behavior are broadcast during Apply Request Values phase. Otherwise, the events will be broadcast during Invoke Aplications phase |
listener | false | jakarta.el.MethodExpression
(signature must match public void
processAjaxBehavior(jakarta.faces.event.AjaxBehaviorEvent event)
throws jakarta.faces.event.AbortProcessingException
)
|
Method expression referencing a method that will be called when an AjaxBehaviorEvent has been broadcast for the listener. |
onerror | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
|
The name of the JavaScript function that will handle errors. |
onevent | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
|
The name of the JavaScript function that will handle UI events. |
render | false | jakarta.el.ValueExpression
(must evaluate to java.util.Collection)
|
Evaluates to
Collection<String>. The search expressions to
components that will participate in the "render" portion
of the Request Processing Lifecycle. See the javadoc for
When nested within a composite component,
and the value contains or implies the keyword |
resetValues | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
|
Reset specific input values.
Interpret the value of the |