JBoss.orgCommunity Documentation

Chapter 5. Advanced features

5.1. JSF 2 integration
5.2. Error handling
5.2.1. Client-side errors
5.2.2. Server-side errors
5.3. Other functions
5.4. Resource loading
5.4.1. Configuring ResourceServlet
5.4.2. Resource optimization
5.4.3. Resource mapping

Read this chapter for details on some of the advanced features and configuration possibilities for the RichFaces framework.

JavaServer Faces (JSF) is the Java-based web application framework upon which the RichFaces framework has been built. RichFaces is now integrated with JSF 2, which features several improvements to the framework.

  • The standard display technology used by JSF 1 was JavaServer Pages (JSP). With JSF 2, the standard display technology has been changed to Facelets, which is a more powerful and more efficient View Declaration Language (VLD) than JSP.

RichFaces allows standard handlers to be defined for processing different application exceptions. Custom JavaScript can be executed when these exceptions occur.

RichFaces provides a number of advanced functions, such as managing user roles and identifying elements. Refer to the Functions chapter in the RichFaces Component Reference for further details.

The RichFaces improves a standard JSF resource handling in order to achieve following features:

  • resource optimization - serves optimized component resource dependencies (JavaScript, CSS)
  • resource mapping - re-routes resource requests (maps an one resource to an another resource)

The resource mapping feature maps an existing JSF resource (determined by library and name) to a another resource.

This feature can help to solve the following cases:

  • providing alternative versions of JSF resources
  • map several JSF resources to one
  • using external resources
  • moving resources to servers serving static content