RichFaces#

Getting started on 18.12.2011#

Home | Components | ShowCases

Note: There are lots of sites in the internet about rich faces. Most of them refer to version 3.3.x. But there have been several changes to version 4.x (support, shuttleList). Please compare with the migration guide 3.3.x to 4.x and the release announcement for 4.1.

I am using JBoss AS 7.02 and followed the Development Guide>Getting Started instructions. It was enough to
(1.) add following jars to my project WEB-INF/lib

richfaces-components-api-4.1.0.Final.jar
richfaces-components-ui-4.1.0.Final.jar
richfaces-core-api-4.1.0.Final.jar
richfaces-core-api-4.1.0.Final.jar
guava-10.0.1.jar
The first four can be download from the RichFaces Homepage, the last one from Google Guave

(2.) Add following last two tags to the main template (or each page)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
        xmlns:rich="http://richfaces.org/rich">	

Just for completion, here are the others:

(3.) RichFaces comes with skins. To use your own (or change it) add the following to WEB-INF/web.xml

<context-param>
	<param-name>org.richfaces.skin</param-name>
	<param-value>plain</param-value>
</context-param>

(4.) There is an error (which you can notice with edgy buttons on plain skin in Firefox)

java.lang.IllegalArgumentException: Width (2000) and height (0) cannot be <= 0
which can be avoided with this:
<context-param>
    <param-name>org.richfaces.enableControlSkinning</param-name>
    <param-value>false</param-value>
</context-param>