Search
Calendar
May 2025
S M T W T F S
« Apr    
 123
45678910
11121314151617
18192021222324
25262728293031
Archives

PostHeaderIcon (long tweet) Add RichFaces to a Maven / JSF 2 project

Case

You have a JSF 2 project that you need upgrade with jBoss RichFaces and Ajax4JSF, (I assume the process is similar for other libraries, such as Primefaces, ICEfaces, etc.).

Quick Fix

In XHTML

In XHTML pages, add the namespaces related to Richfaces:

      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"

In Maven

In Maven’s pom.xml, I suggest to add a property, such as:

    <properties>
        <richfaces.version>4.1.0.Final</richfaces.version>
    </properties>

Add the following dependency blocks:

<dependency>
    <groupId>org.richfaces.ui</groupId>
    <artifactId>richfaces-components-ui</artifactId>
    <version>${richfaces.version}</version>
</dependency>
<dependency>
    <groupId>org.richfaces.core</groupId>
    <artifactId>richfaces-core-impl</artifactId>
    <version>${richfaces.version}</version>
</dependency>

Leave a Reply