Tag Attributes for Ajax in Java Server Faces for Lazy Persons

Tag Attributes for Ajax in Java Server Faces for Lazy Persons

evaluates to a Boolean

disabled
If true, the Ajax behavior should be applied to any parent or child components. If false, the Ajax behavior should be disabled.

evaluates to a String

event
The event that will invoke Ajax requests ( “click”, “keypress”, etc.)

evaluates to an Object

execute
A space-separated List of IDs for components that should be included in the Ajax request.

evaluates to a Boolean

immediate
If true, behavior events generated from this behavior are broadcasted during Apply Request Values phase.If false, the events will be broadcasted during Invoke Applications phase
listener
In Expression Language, an expression for a method in a backing bean to be called during the Ajax request.

evaluates to a String

onevent
The name of a JavaScript callback function that should be invoked to handle UI events.

evaluates to a String

onerror
The name of a JavaScript callback function that should be invoked if an error happens during the Ajax request

evaluates to an Object

render
A space-separated list of IDs for components that should be updated after an Ajax request.

<f:ajax event=”keyup” execute=”intxt2″ render=”otxt2″ />

<f:ajax execute=”intxt2″ render=”otxt2″ />

These keywords can be used with the execute and render attributes of the f:ajax tag.

           <h:commandButton value=”Click Me”>
                  <f:ajax execute=”@form” render=”time”/>
          </h:commandButton>

Keyword

Description

@all

All component identifiers are processed

@form

All components identifiers included in this form are only processed

@none

No component identifiers are processed

@this

The element that triggered the request is only processed (default)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s