JBoss.orgCommunity Documentation

Chapter 4. Basic concepts

4.1. Sending an Ajax request
4.2. Partial tree processing
4.3. Partial view updates
4.4. Component overview

Read this chapter for the basic concepts of using RichFaces in conjunction with Ajax and JavaServer Faces.

Many of the tags in the a4j and rich tag libraries are capable of sending Ajax requests from a JavaServer Faces (JSF) page.

Use the execute attribute to specify which parts of the JSF tree to process during an Ajax request. The execute attribute can point to an id identifier of a specific component to process. Components can also be identified through the use of Expression Language (EL).

Alternatively, the execute attribute accepts the following keywords:

Some components make use of additional keywords. These are detailed under the relevant component entry in the RichFaces Component Reference.

Use the render attribute to specify which components to render for an Ajax update. The render attribute can point to an id identifier of a specific component to update. Components can also be identified through the use of Expression Language (EL).

Alternatively, the render attribute accepts the following keywords:

Some components make use of additional keywords. These are detailed under the relevant component entry in the RichFaces Component Reference.

Use the <a4j:outputPanel> component with the ajaxRendered="true" setting to always update a section irrespective of the requesting component's render attribute. The <rich:message> and <rich:messages> components are based on the <a4j:outputPanel> component, and as such will also always be updated. To override this behavior, use the limitRender="true" setting on the requesting component.

The RichFaces framework is made up of two tag libraries: the a4j library and the rich library. The a4j tag library represents Ajax4jsf, which provides page-level Ajax support with core Ajax components. This allows developers to make use of custom Ajax behavior with existing components. The rich tag library provides Ajax support at the component level instead, and includes ready-made, self-contained components. These components don't require additional configuration in order to send requests or update.

For details on the use of the various components, refer to RichFaces Component Reference.