Faces Core
Tag ajax


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.

  1. <h:form id="form_1">
  2.   <h:panelGrid id="panel_1" rows="2">
  3.     <!-- content irrelevant -->
  4.   </h:panelGrid>
  5. </h:form>
  6.  
  7. <h:form id="form_2">
  8.   <h:commandButton id="button">
  9.     <f:ajax render=":form1:panel_1 panel_2" />
  10.   </h:commandButton>
  11.   <h:panelGrid id="panel_2">
  12.     <!-- content irrelevant -->
  13.   </h:panelGrid>
  14. </h:form>

When the button is pressed, panel_1, in form_1 will be re-rendered, along with panel_2 in form_2.



Tag Information
Tag ClassNone
TagExtraInfo ClassNone
Body Contentempty
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
disabledfalsefalsejavax.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.

eventfalsefalsejavax.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. For HTML components this would be the set of supported DOM events for the component, plus "action" for Faces ActionSource components and "valueChange" for Faces EditableValueHolder components. If not specified, the default event is determined for the component. The DOM event name is the actual DOM event name (for example: "click") as opposed to (for example: "onclick").

executefalsefalsejavax.el.ValueExpression
(must evaluate to java.util.Collection)

Evaluates to Collection<String>. This is a space separated list of client ids of components that will participate in the "execute" portion of the Request Processing Lifecycle. If a literal is specified the ids must be space delimited. Any of the keywords "@this", "@form", "@all", "@none" may be specified in the id list. If not specified, the default value of "@this" is assumed. For example, @this clientIdOne clientIdTwo.

immediatefalsefalsejavax.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

listenerfalsefalsejavax.el.MethodExpression
(signature must match public void processAjaxBehavior(javax.faces.event.AjaxBehaviorEvent event) throws javax.faces.event.AbortProcessingException)

Method expression referencing a method that will be called when an AjaxBehaviorEvent has been broadcast for the listener.

oneventfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)

The name of the JavaScript function that will handle UI events.

delayfalsefalsejavax.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 'none' without the quotes, no delay is used.

resetValuesfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.Boolean)

If true, indicate that this particular Ajax transaction is a value reset transaction. This will cause resetValue() to be called on any EditableValueHolder instances encountered as a result of this ajax transaction. If not specified, or the value is false, no such indication is made.

onerrorfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)

The name of the JavaScript function that will handle errors.

renderfalsefalsejavax.el.ValueExpression
(must evaluate to java.util.Collection)

Evaluates to Collection<String>. The clientIds of components that will participate in the "render" portion of the Request Processing Lifecycle. If a literal is specified the identifiers must be space delimited. Any of the keywords "@this", "@form", "@all", "@none" may be specified in the identifier list. If not specified, the default value of "@none" is assumed. For example, @this clientIdOne clientIdTwo.


Variables
No Variables Defined.