RichFaces
RichFaces was an open source Ajax-enabled component library for JavaServer Faces, hosted by JBoss. It allows easy integration of Ajax capabilities into enterprise application development. It reached its end-of-life in June 2016.
RichFaces is more than just a component library for JavaServer Faces. It adds:
- Skinability
- Component Development Kit to assist in constructing JavaServer Faces components
- Dynamic Resource Framework
- Both page wide, and component based Ajax control components.
History
In March 2007 JBoss and Exadel signed a partnership agreement whereby Ajax4jsf and RichFaces would come under the JBoss umbrella as "JBoss Ajax4jsf" and as "JBoss RichFaces". RichFaces would now also become open-source and free. In September 2007 JBoss and Exadel decided to merge Ajax4jsf and RichFaces under the RichFaces name. It made sense as both libraries were now free and open-source. Having just one product solved many existing version- and compatibility-issues, such as which version of Ajax4jsf would work with which version of RichFaces.
On February 12, 2016, the RichFaces developer Michal Petrov announced the end-of-life of RichFaces for June 2016.
Framework
The framework is implemented as a component library which adds Ajax capability into existing pages, so a developer doesn't need to write any JavaScript code or to replace existing components with new Ajax widgets. RichFaces enables page-wide Ajax support instead of the traditional component-wide support. Hence, a developer can define the event on the page that invokes an Ajax request and the areas of the page that should be synchronized with the JSF Component Tree after the Ajax request changes the data on the server according to the events fired on the client.RichFaces allows you to define different parts of a JSF page you wish to update with an Ajax request, and provides a few options to send Ajax requests to the server. Also the JSF page doesn't change from a "regular" JSF page and you don't need to write any JavaScript code by hand. By controlling everything from the server side, almost no JavaScript is needed and the page state can be maintained easily in the server.
RichFaces architecture
The architecture of RichFaces consists of an Ajax filter, Ajax action components, Ajax containers, and a JavaScript engine.Skinnability
is a special feature of RichFaces that is used for defining common interface styles. The feature is based on XCSS technology, which provides flexibility and dynamics. RichFaces provides a set of predefined skins:- DEFAULT
- plain
- emeraldTown
- blueSky
- wine
- japanCherry
- ruby
- classic
- deepMarine
- Laguna
- GlassX
- DarkX
You can create a custom skin using Plug-n-Skin feature, which is a Maven archetype that builds a skeleton for a new skin.
Simple JSF page with RichFaces calendar component
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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">
popup="#"
showApplyButton="#"
cellWidth="24px" cellHeight="22px" style="width:200px"/>
This is the result of the presented above code