a4j:support is the most important core component in the RichFaces library. It allows to add an Ajax capability to the existing non-ajax components. All other Ajax components are based on the same principles a4j:support has.

a4j:support should be attached to a direct child of the JSF component that has to be ajaxified. The key attributes are 'event' and 'reRender'.

event attribute defines the javascript event the ajax support will be attached to.

'reRender' attribute points to the JSF component(s) that should be re-rendered on the server side and updated on the client when an Ajax Response comes back.

The following example shows how the outputText component value is changed while a user is typing in the input field:

AjaxSupport Demo

a4j:support is wired with the event of the parent component during the Render Response phase on the server side. Hence, the number of possible events is limited to the ones defined with particular component attributes. The wiring with events dynamically attached on the client side is not supported.

In case of attaching a4j:support to non-Ajax JSF command component, such as h:commandButton or h:commandLink, it is important to set disableDefault to true. Otherwise, a non-ajax request is sent just after an Ajax request and the page is unexpectedly refreshed.

For additional information about attributes of this compponent read .