JBoss.orgCommunity Documentation

Chapter 3. RichFaces overview

3.1. Full technical requirements
3.1.1. Server requirements
3.1.2. Client requirements
3.1.3. Development requirements
3.2. Architecture
3.2.1. Ajax Action Components
3.2.2. Ajax Containers
3.2.3. Ajax Output
3.2.4. Skins and theming
3.2.5. RichFaces Ajax Extensions
3.3. Technologies
3.4. Differences between JSF and RichFaces mechanisms
3.5. Restrictions
3.6. Compiling from source code

Read this chapter for technical details on the RichFaces framework.

RichFaces has been developed with an open architecture to be compatible with a wide variety of environments.

The important elements of the RichFaces framework are as follows:

Read this section for details on each element.

RichFaces 4 features full JSF 2 integration and uses standard web application technologies such as JavaScript, XML (Extensible Markup Language), and XHTML (Extensible Hypertext Markup Language).

JavaServer Faces 2 evaluates Ajax options, such as execute and render, while rendering a page. This allows any parameters to be sent directly from the client side.

RichFaces evaluates the options when the current request is sent. This increases both the security of the data and the convenience for evaluating parameters.

For example, binding Ajax options to Java Bean properties in RichFaces allows you to evaluate the options dynamically for the current request, such as defining additional zones to render. Parameters changed manually on the client side will not influence the request processing. With JSF 2, the options have evaluated during the previous page rendering would need to be used.

The following restrictions apply to applications implementing the RichFaces framework:

The source code for the RichFaces framework can be compiled manually rather than using the pre-compiled binaries.

  1. Acquiring the source code

  2. Unzip archive

    If using the downloaded distribution, create a new directory named RichFaces, then unzip the archive containing the source code there.

  3. Configure Maven for RichFaces

    To compile the RichFaces source code, Maven requires access to the JBoss repositories. Refer to Step 1 of the procedure in Section 2.5.2, “Using the RichFaces project archetype” to configure the required repositories.

  4. Compile using Maven

    In the root directory of the unzipped source code, enter the following command to compile and build the RichFaces framework:

    mvn clean install

    Add any of the following options after the command to customize the build:

    -P release,docs

    Maven additionally builds the documentation and release artifacts.

    -D skipTests=true

    Maven skips the unit and functional tests, which completes the build faster.

    -D checkstyle.skip=true

    Maven skips the scans for checking style, which completes the build faster.

    -D skip-source

    Maven does not produce any source jar files from the build.

    -D skip-enforce

    Maven does not check for the correct JDK version, Maven version, and SNAPSHOT plug-in, and forces the build.

    -D jsf-profile=implementation

    Maven tests builds and tests against the specified JSF implementation. The implementation value can be any of the following:

    • jsf_ri: The latest release of JSF RI (Mojarra). This is the default implemenation.

    • jsf_ri_javax: The latest release of javax.faces.

    • jsf_ri_snapshot: The latest snapshot version of JSF RI (Mojarra).

    • myfaces: The latest release of MyFaces.

    • myfaces: The latest snapshot version of MyFaces.

  5. Access compiled binaries

    The compiled libraries are located in the following sub-directories of the root RichFaces directory:

    • /ui/dist/richfaces-components-api/target/richfaces-components-api-version-SNAPSHOT.jar

    • /ui/dist/richfaces-components-ui/target/richfaces-components-ui-version-SNAPSHOT.jar

    • /core/api/target/richfaces-core-api-version-SNAPSHOT.jar

    • /core/impl/target/richfaces-core-impl-version-SNAPSHOT.jar

You can now add the compiled libraries to your project as described in Step 2 of Section 2.4, “Creating a project with JBoss Tools”.