Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

RichFaces Developer Guide

RichFaces framework with a huge library of rich components and skinnability support


1. Introduction
+2. Technical Requirements
2.1. Supported Java Versions
2.2. Supported JavaServer Faces Implementations and Frameworks
2.3. Supported Servers
2.4. Supported Browsers
+3. Getting Started with RichFaces
3.1. Downloading the RichFaces
+3.2. Simple JSF application with RichFaces
3.2.1. Adding RichFaces libraries into the project
3.2.2. Registering RichFaces in web.xml
3.2.3. Managed bean
3.2.4. Registering bean in faces-cofig.xml
3.2.5. RichFaces Greeter index.jsp
3.3. Integration of RichFaces into Maven Project
3.4. Relevant Resources Links
+4. Settings for different environments
4.1. Web Application Descriptor Parameters
4.2. Sun JSF RI
4.3. Apache MyFaces
4.4. Facelets Support
4.5. JBoss Seam Support
4.6. Portlet Support
4.7. Sybase EAServer
4.8. Oracle AS/OC4J
+5. Basic concepts of the RichFaces Framework
5.1. Introduction
5.2. RichFaces Architecture Overview
5.3. RichFaces Integral Parts
5.4. Limitations and Rules
+5.5. Ajax Request Optimization
5.5.1. Re-Rendering
5.5.2. Queue and Traffic Flood Protection
+5.5.3. Queue Principles
5.5.3.1. Global default queue, defined in the web.xml file
5.5.3.2. View scoped default queue
5.5.3.3. View scoped named queue
5.5.3.4. Form based default queue
+5.5.3.5. Queue functionality
5.5.3.5.1. Events Similarity
5.5.3.5.2. Similar requests during request delay
5.5.3.5.3. JavaScript API
5.5.4. Data Processing Options
5.5.5. Action and Navigation
5.5.6. JavaScript Interactions
5.5.7. Iteration components Ajax attributes
5.5.8. Other useful attributes
+5.6. How To...
5.6.1. Send an Ajax request
5.6.2. Decide What to Send
5.6.3. Decide What to Change
5.6.4. Decide what to process
5.7. Filter Configuration
5.8. Scripts and Styles Load Strategy
+5.9. Request Errors and Session Expiration Handling
5.9.1. Request Errors Handling
5.9.2. Session Expired Handling
+5.10. Skinnability
5.10.1. Why Skinnability
5.10.2. Using Skinnability
5.10.3. Example
5.10.4. Skin Parameters Tables in RichFaces
5.10.5. Creating and Using Your Own Skin File
5.10.6. Built-in Skinnability in RichFaces
5.10.7. Changing skin in runtime
+5.10.8. Standard Controls Skinning
5.10.8.1. Standard level
5.10.8.2. Extended level
5.10.9. Client-side Script for Extended Skinning Support
5.10.10. XCSS File Format
+5.10.11. Plug-n-Skin
5.10.11.1. Details of Usage
5.11. State Manager API
5.12. Identifying User Roles
+6. The RichFaces Components
+6.1. < a4j:ajaxListener >
6.1.1. Description
6.1.2. Creating on a page
6.1.3. Creating the Component Dynamically Using Java
6.1.4. Key attributes and ways of usage
6.1.5. Relevant resources links
+6.2. < a4j:keepAlive >
6.2.1. Description
6.2.2. Using the tag on a Page
6.2.3. Key attributes and ways of usage
6.2.4. Relevant resources links
+6.3. < a4j:actionparam >
6.3.1. Description
6.3.2. Creating on a page
6.3.3. Creating the Component Dynamically Using Java
6.3.4. Key attributes and ways of usage
6.3.5. Relevant resources links
+6.4. < a4j:commandButton >
6.4.1. Description
6.4.2. Creating on a page
6.4.3. Creating the Component Dynamically Using Java
6.4.4. Key attributes and ways of usage
6.4.5. Relevant resources links
+6.5. < a4j:commandLink >
6.5.1. Description
6.5.2. Creating on a page
6.5.3. Creating the Component Dynamically Using Java
6.5.4. Key attributes and ways of usage
6.5.5. Relevant resources links
+6.6. < a4j:form >
6.6.1. Description
6.6.2. Creating on a page
6.6.3. Creating the Component Dynamically Using Java
6.6.4. Key attributes and ways of usage
6.6.5. Relevant resources links
+6.7. < a4j:htmlCommandLink >
6.7.1. Description
6.7.2. Creating the Component with a Page Tag
6.7.3. Creating the Component Dynamically Using Java
6.7.4. Key attributes and ways of usage
6.7.5. Relevant resources links
+6.8. < a4j:jsFunction >
6.8.1. Description
6.8.2. Creating on a page
6.8.3. Creating the Component Dynamically Using Java
6.8.4. Key attributes and ways of usage
6.8.5. Relevant resources links
+6.9. < a4j:include >
6.9.1. Description
6.9.2. Creating on a page
6.9.3. Creating the Component Dynamically Using Java
6.9.4. Relevant resources links
+6.10. < a4j:loadBundle >
6.10.1. Description
6.10.2. Creating on a page
6.10.3. Creating the Component Dynamically Using Java
6.10.4. Key attributes and ways of usage
6.10.5. Relevant resources links
+6.11. < a4j:loadScript >
6.11.1. Description
6.11.2. Creating on a page
6.11.3. Creating the Component Dynamically Using Java
6.11.4. Key attributes and ways of usage
6.11.5. Relevant resources links
+6.12. < a4j:loadStyle >
6.12.1. Description
6.12.2. Creating on a page
6.12.3. Creating the Component Dynamically Using Java
6.12.4. Key attributes and ways of usage
6.12.5. Relevant resources links
+6.13. < a4j:log >
6.13.1. Description
6.13.2. Creating the Component with a Page Tag
6.13.3. Creating the Component Dynamically Using Java
6.13.4. Key attributes and ways of usage
6.13.5. Relevant resources links
+6.14. < a4j:mediaOutput >
6.14.1. Description
6.14.2. Creating on a page
6.14.3. Creating the Component Dynamically Using Java
6.14.4. Key attributes and ways of usage
6.14.5. Relevant resources links
+6.15. < a4j:outputPanel >
6.15.1. Description
6.15.2. Creating on a page
6.15.3. Creating the Component Dynamically Using Java
6.15.4. Key attributes and ways of usage
6.15.5. Relevant resources links
+6.16. < a4j:page >
6.16.1. Description
6.16.2. Creating on a page
6.16.3. Creating the Component Dynamically Using Java
6.16.4. Facets
6.16.5. Key attributes and ways of usage
6.16.6. Relevant resources links
+6.17. < a4j:poll >
6.17.1. Description
6.17.2. Creating on a page
6.17.3. Creating the Component Dynamically Using Java
6.17.4. Key attributes and ways of usage
6.17.5. Relevant resources links
+6.18. < a4j:portlet >
6.18.1. Description
6.18.2. Creating the Component with a Page Tag
6.18.3. Creating the Component Dynamically Using Java
6.18.4. Key attributes and ways of usage
6.18.5. Relevant resources links
+6.19. < a4j:push >
6.19.1. Description
6.19.2. Creating on a page
6.19.3. Creating the Component Dynamically Using Java
6.19.4. Key attributes and ways of usage
6.19.5. Relevant resources links
+6.20. < a4j:queue >
6.20.1. Description
6.20.2. Creating on a page
6.20.3. Creating the Component Dynamically Using Java
6.20.4. Key attributes and ways of usage
6.20.5. JavaScript API
6.20.6. Relevant resources links
+6.21. < a4j:region >
6.21.1. Description
6.21.2. Creating on a page
6.21.3. Creating the Component Dynamically Using Java
6.21.4. Key attributes and ways of usage
6.21.5. Relevant resources links
+6.22. < a4j:repeat >
6.22.1. Description
6.22.2. Creating on a page
6.22.3. Creating the Component Dynamically Using Java
6.22.4. Key attributes and ways of usage
6.22.5. Relevant resources links
+6.23. < a4j:status >
6.23.1. Description
6.23.2. Creating on a page
6.23.3. Creating the Component Dynamically Using Java
6.23.4. Facets
6.23.5. Key attributes and ways of usage
6.23.6. Relevant resources links
+6.24. < a4j:support >
6.24.1. Description
6.24.2. Creating on a page
6.24.3. Creating the Component Dynamically Using Java
6.24.4. Key attributes and ways of usage
6.24.5. Relevant resources links
+6.25. < rich:ajaxValidator >
6.25.1. Description
6.25.2. Key Features
6.25.3. Creating the Component with a Page Tag
6.25.4. Creating the Component Dynamically Using Java
6.25.5. Details of Usage
6.25.6. Relevant Resources Links
+6.26. < rich:graphValidator >
6.26.1. Description
6.26.2. Key Features
6.26.3. Creating the Component with a Page Tag
6.26.4. Creating the Component Dynamically Using Java
6.26.5. Relevant Resources Links
+6.27. < rich:beanValidator >
6.27.1. Description
6.27.2. Key Features
6.27.3. Creating the Component with a Page Tag
6.27.4. Creating the Component Dynamically Using Java
6.27.5. Details of Usage
6.27.6. Relevant Resources Links
+6.28. < rich:calendar >
6.28.1. Description
6.28.2. Key Features
6.28.3. Creating the Component with a Page Tag
6.28.4. Creating the Component Dynamically Using Java
6.28.5. Details of Usage
6.28.6. JavaScript API
6.28.7. Facets
6.28.8. Look-and-Feel Customization
6.28.9. Skin Parameters Redefinition
6.28.10. Definition of Custom Style Classes
6.28.11. Relevant Resources Links
+6.29. < rich:colorPicker >
6.29.1. Description
6.29.2. Key Features
6.29.3. Creating the Component with a Page Tag
6.29.4. Creating the Component Dynamically Using Java
6.29.5. Details of Usage
6.29.6. Look-and-Feel Customization
6.29.7. Skin Parameters Redefinition
6.29.8. Definition of Custom Style Classes
6.29.9. Relevant Resources Links
+6.30. < rich:comboBox >
6.30.1. Description
6.30.2. Key Features
6.30.3. Creating the Component with a Page Tag
6.30.4. Creating the Component Dynamically Using Java
6.30.5. Details of Usage
6.30.6. JavaScript API
6.30.7. Look-and-Feel Customization
6.30.8. Skin Parameters Redefinition
6.30.9. Definition of Custom Style Classes
6.30.10. Relevant Resources Links
+6.31. < rich:componentControl >
6.31.1. Description
6.31.2. Key Features
6.31.3. Creating the Component with a Page Tag
6.31.4. Creating the Component Dynamically Using Java
6.31.5. Details of Usage
6.31.6. Look-and-Feel Customization
6.31.7. Relevant Resources Links
+6.32. < rich:contextMenu >
6.32.1. Description
6.32.2. Key Features
6.32.3. Creating the Component with a Page Tag
6.32.4. Creating the Component Dynamically Using Java
6.32.5. Details of Usage
6.32.6. JavaScript API
6.32.7. Look-and-Feel Customization
6.32.8. Skin Parameters Redefinition
6.32.9. Definition of Custom Style Classes
6.32.10. Relevant Resources Links
+6.33. < rich:dataFilterSlider >
6.33.1. Description
6.33.2. Key Features
6.33.3. Creating the Component with a Page Tag
6.33.4. Creating the Component Dynamically Using Java
6.33.5. Details of Usage
6.33.6. Look-and-Feel Customization
6.33.7. Relevant Resources Links
+6.34. < rich:datascroller >
6.34.1. Description
6.34.2. Key Features
6.34.3. Creating the Component with a Page Tag
6.34.4. Creating the Component Dynamically Using Java
6.34.5. Details of Usage
6.34.6. Facets
6.34.7. Look-and-Feel Customization
6.34.8. Skin Parameters Redefinition
6.34.9. Definition of Custom Style Classes
6.34.10. Relevant Resources Links
+6.35. < rich:columns >
6.35.1. Description
6.35.2. Key Features
6.35.3. Creating the Component with a Page Tag
6.35.4. Creating the Component Dynamically Using Java
6.35.5. Details of Usage
6.35.6. Facets
6.35.7. Look-and-Feel Customization
6.35.8. Skin Parameters Redefinition
6.35.9. Definition of Custom Style Classes
6.35.10. Relevant Resources Links
+6.36. < rich:columnGroup >
6.36.1. Description
6.36.2. Key Features
6.36.3. Creating the Component with a Page Tag
6.36.4. Creating the Component Dynamically Using Java
6.36.5. Details of Usage
6.36.6. Look-and-Feel Customization
6.36.7. Skin Parameters Redefinition
6.36.8. Definition of Custom Style Classes
6.36.9. Relevant Resources Links
+6.37. < rich:column >
6.37.1. Description
6.37.2. Key Features
6.37.3. Creating the Component with a Page Tag
6.37.4. Creating the Component Dynamically Using Java
6.37.5. Details of Usage
+6.37.6. Sorting and Filtering
6.37.6.1. Sorting
6.37.6.2. Filtering
6.37.7. Facets
6.37.8. Look-and-Feel Customization
6.37.9. Skin Parameters Redefinition
6.37.10. Definition of Custom Style Classes
6.37.11. Relevant Resources Links
+6.38. < rich:dataGrid >
6.38.1. Description
6.38.2. Key Features
6.38.3. Creating the Component with a Page Tag
6.38.4. Creating the Component Dynamically Using Java
6.38.5. Details of Usage
6.38.6. Facets
6.38.7. Look-and-Feel Customization
6.38.8. Skin Parameters Redefinition
6.38.9. Definition of Custom Style Classes
6.38.10. Relevant Resources Links
+6.39. < rich:dataList >
6.39.1. Description
6.39.2. Key Features
6.39.3. Creating the Component with a Page Tag
6.39.4. Creating the Component Dynamically Using Java
6.39.5. Details of Usage
6.39.6. Look-and-Feel Customization
6.39.7. Definition of Custom Style Classes
6.39.8. Relevant Resources Links
+6.40. < rich:dataOrderedList >
6.40.1. Description
6.40.2. Key Features
6.40.3. Creating the Component with a Page Tag
6.40.4. Creating the Component Dynamically Using Java
6.40.5. Details of Usage
6.40.6. Look-and-Feel Customization
6.40.7. Definition of Custom Style Classes
6.40.8. Relevant Resources Links
+6.41. < rich:dataDefinitionList >
6.41.1. Description
6.41.2. Key Features
6.41.3. Creating the Component with a Page Tag
6.41.4. Creating the Component Dynamically Using Java
6.41.5. Details of Usage
6.41.6. Look-and-Feel Customization
6.41.7. Definition of Custom Style Classes
6.41.8. Relevant Resources Links
+6.42. < rich:dataTable >
6.42.1. Description
6.42.2. Key Features
6.42.3. Creating the Component with a Page Tag
6.42.4. Creating the Component Dynamically from Java
6.42.5. Details of Usage
6.42.6. Facets
6.42.7. Look-and-Feel Customization
6.42.8. Skin Parameters Redefinition
6.42.9. Definition of Custom Style Classes
6.42.10. Relevant Resources Links
+6.43. < rich:subTable >
6.43.1. Description
6.43.2. Key Features
6.43.3. Creating the Component with a Page Tag
6.43.4. Creating the Component Dynamically Using Java
6.43.5. Details of Usage
6.43.6. Facets
6.43.7. Look-and-Feel Customization
6.43.8. Skin Parameters Redefinition
6.43.9. Definition of Custom Style Classes
+6.44. < rich:editor >
6.44.1. Description
6.44.2. Key Features
6.44.3. Creating the Component with a Page Tag
6.44.4. Creating the Component Dynamically Using Java
6.44.5. Details of Usage
6.44.6. Look-and-Feel Customization
6.44.7. Skin Parameters Redefinition
6.44.8. Definition of Custom Style Selectors
6.44.9. Relevant Resources Links
+6.45. < rich:dndParam >
6.45.1. Description
6.45.2. Creating the Component with a Page Tag
6.45.3. Creating the Component Dynamically Using Java
6.45.4. Details of Usage
6.45.5. Look-and-Feel Customization
6.45.6. Relevan Resources Links
+6.46. < rich:dragIndicator >
6.46.1. Description
6.46.2. Key Features
6.46.3. Creating the Component with a Page Tag
6.46.4. Creating the Component Dynamically Using Java
+6.46.5. Details of Usage
6.46.5.1. Macro definitions
6.46.5.2. Predefined macro definitions
6.46.5.3. Marker customization
6.46.6. Look-and-Feel Customization
6.46.7. Relevant Resources Links
+6.47. < rich:dragSupport >
6.47.1. Description
6.47.2. Key Features
6.47.3. Creating the Component with a Page Tag
6.47.4. Creating the Component Dynamically Using Java
6.47.5. Details of Usage
6.47.6. Look-and-Feel Customization
6.47.7. Relevant Resources Links
+6.48. < rich:dropSupport >
6.48.1. Description
6.48.2. Key Features
6.48.3. Creating the Component with a Page Tag
6.48.4. Creating the Component Dynamically Using Java
6.48.5. Details of Usage
6.48.6. Look-and-Feel Customization
6.48.7. Relevant Resources Links
+6.49. < rich:dragListener >
6.49.1. Description
6.49.2. Key Features
6.49.3. Creating the Component with a Page Tag
6.49.4. Creating the Component Dynamically Using Java
6.49.5. Details of Usage
6.49.6. Look-and-Feel Customization
+6.50. < rich:dropListener >
6.50.1. Description
6.50.2. Key Features
6.50.3. Creating the Component with a Page Tag
6.50.4. Creating the Component Dynamically Using Java
6.50.5. Details of Usage
6.50.6. Look-and-Feel Customization
+6.51. < rich:dropDownMenu >
6.51.1. Description
6.51.2. Key Features
6.51.3. Creating the Component with a Page Tag
6.51.4. Creating the Component Dynamically Using Java
6.51.5. Details of Usage
6.51.6. Facets
6.51.7. Look-and-Feel Customization
6.51.8. Skin Parameters Redefinition
6.51.9. Definition of Custom Style Classes
6.51.10. Relevant Resources Links
+6.52. < rich:extendedDataTable >
6.52.1. Description
6.52.2. Key Features
6.52.3. Creating the Component with a Page Tag
6.52.4. Creating the Component Dynamically from Java
6.52.5. Details of Usage
6.52.6. Facets
6.52.7. Look-and-Feel Customization
6.52.8. Skin Parameters Redefinition
6.52.9. Definition of Custom Style Classes
6.52.10. Relevant resources links
+6.53. < rich:menuGroup >
6.53.1. Description
6.53.2. Key Features
6.53.3. Creating the Component with a Page Tag
6.53.4. Creating the Component Dynamically Using Java
6.53.5. Details of Usage
6.53.6. Facets
6.53.7. Look-and-Feel Customization
6.53.8. Skin Parameters Redefinition
6.53.9. Definition of Custom Style Classes
6.53.10. Relevant Resources Links
+6.54. < rich:menuItem >
6.54.1. Description
6.54.2. Key Features
6.54.3. Creating the Component with a Page Tag
6.54.4. Creating the Component Dynamically Using Java
6.54.5. Details of Usage
6.54.6. Facets
6.54.7. Look-and-Feel Customization
6.54.8. Skin Parameters Redefinition
6.54.9. Definition of Custom Style Classes
6.54.10. Relevant Resources Links
+6.55. < rich:menuSeparator >
6.55.1. Description
6.55.2. Creating the Component with a Page Tag
6.55.3. Creating the Component Dynamically Using Java
6.55.4. Look-and-Feel Customization
6.55.5. Skin Parameters Redefinition
6.55.6. Definition of Custom Style Classes
6.55.7. Relevant Resources Links
+6.56. < rich:effect >
6.56.1. Description
6.56.2. Key Features
6.56.3. Creating the Component with a Page Tag
6.56.4. Creating the Component Dynamically Using Java
6.56.5. Details of Usage
6.56.6. Look-and-Feel Customization
6.56.7. Relevant Resources Links
+6.57. < rich:fileUpload >
6.57.1. Description
6.57.2. Key Features
6.57.3. Creating the Component with a Page Tag
6.57.4. Creating the Component Dynamically Using Java
6.57.5. Details of Usage
6.57.6. JavaScript API
6.57.7. Facets
6.57.8. Look-and-Feel Customization
6.57.9. Skin Parameters Redefinition
6.57.10. Definition of Custom Style Classes
6.57.11. Relevant Resources Links
+6.58. < rich:gmap >
6.58.1. Description
6.58.2. Key Features
6.58.3. Creating the Component with a Page Tag
6.58.4. Creating the Component Dynamically Using Java
6.58.5. Details of Usage
6.58.6. Look-and-Feel Customization
6.58.7. Definition of Custom Style Classes
6.58.8. Relevant Resources Links
+6.59. < rich:virtualEarth >
6.59.1. Description
6.59.2. Key Features
6.59.3. Creating the Component with a Page Tag
6.59.4. Creating the Component Dynamically Using Java
6.59.5. Details of Usage
6.59.6. Look-and-Feel Customization
6.59.7. Definition of Custom Style Classes
6.59.8. Relevant Resources Links
+6.60. < rich:hotKey >
6.60.1. Description
6.60.2. Key Features
6.60.3. Creating the Component with a Page Tag
6.60.4. Creating the Component Dynamically Using Java
6.60.5. Details of Usage
6.60.6. JavaScript API
6.60.7. Look-and-Feel Customization
6.60.8. Relevant Resources Links
+6.61. < rich:inplaceInput >
6.61.1. Description
6.61.2. Key Features
6.61.3. Creating the Component with a Page Tag
6.61.4. Creating the Component Dynamically Using Java
6.61.5. Details of Usage
6.61.6. JavaScript API
6.61.7. Facets
6.61.8. Look-and-Feel Customization
6.61.9. Skin Parameters Redefinition
6.61.10. Definition of Custom Style Classes
6.61.11. Relevant Resources Links
+6.62. < rich:inplaceSelect >
6.62.1. Description
6.62.2. Key Features
6.62.3. Creating the Component with a Page Tag
6.62.4. Creating the Component Dynamically Using Java
6.62.5. Details of Usage
6.62.6. JavaScript API
6.62.7. Facets
6.62.8. Look-and-Feel Customization
6.62.9. Skin Parameters Redefinition
6.62.10. Definition of Custom Style Classes
6.62.11. Relevant Resources Links
+6.63. < rich:inputNumberSlider >
6.63.1. Description
6.63.2. Key Features
+6.64. < rich:inputNumberSpinner >
6.64.1. Description
6.64.2. Key Features
6.64.3. Creating the Component with a Page Tag
6.64.4. Creating the Component Dynamically Using Java
6.64.5. Details of Usage
6.64.6. Look-and-Feel Customization
6.64.7. Skin Parameters Redefinition
6.64.8. Definition of Custom Style Classes
6.64.9. Relevant Resources Links
+6.65. < rich:insert >
6.65.1. Description
6.65.2. Key Features
6.65.3. Creating the Component with a Page Tag
6.65.4. Creating the Component Dynamically Using Java
6.65.5. Details of Usage
6.65.6. Look-and-Feel Customization
6.65.7. Relevant Resources Links
+6.66. < rich:jQuery >
6.66.1. Description
6.66.2. Key Features
6.66.3. Creating the Component with a Page Tag
6.66.4. Creating the Component Dynamically Using Java
6.66.5. Details of Usage
6.66.6. Look-and-Feel Customization
6.66.7. Relevant Resources Links
+6.67. < rich:layout >
6.67.1. Description
6.67.2. Key Features
6.67.3. Creating the Component with a Page Tag
6.67.4. Creating the Component Dynamically Using Java
6.67.5. Details of Usage
6.67.6. Relevant Resources Links
+6.68. < rich:layoutPanel >
6.68.1. Description
6.68.2. Key Features
6.68.3. Creating the Component with a Page Tag
6.68.4. Creating the Component Dynamically Using Java
6.68.5. Details of Usage
6.68.6. Relevant Resources Links
+6.69. < rich:page >
6.69.1. Description
6.69.2. Key Features
6.69.3. Creating the Component with a Page Tag
6.69.4. Creating the Component Dynamically Using Java
6.69.5. Details of Usage
6.69.6. Facets
6.69.7. Skin Parameters for the "simple" theme
6.69.8. Component CSS Selectors
6.69.9. Relevant Resources Links
+6.70. < rich:listShuttle >
6.70.1. Description
6.70.2. Key Features
6.70.3. Creating the Component with a Page Tag
6.70.4. Creating the Component Dynamically Using Java
6.70.5. Details of Usage
6.70.6. JavaScript API
6.70.7. Facets
6.70.8. Look-and-Feel Customization
6.70.9. Skin Parameters Redefinition
6.70.10. Definition of Custom Style Classes
6.70.11. Relevant Resources Links
+6.71. < rich:message >
6.71.1. Description
6.71.2. Key Features
6.71.3. Creating the Component with a Page Tag
6.71.4. Creating the Component Dynamically Using Java
6.71.5. Details of Usage
6.71.6. Facets
6.71.7. Look-and-Feel Customization
6.71.8. Definition of Custom Style Classes
6.71.9. Relevant Resources Links
+6.72. < rich:messages >
6.72.1. Description
6.72.2. Key Features
6.72.3. Creating the Component with a Page Tag
6.72.4. Creating the Component Dynamically Using Java
6.72.5. Details of Usage
6.72.6. Look-and-Feel Customization
6.72.7. Definition of Custom Style Classes
6.72.8. Relevant Resources Links
+6.73. < rich:modalPanel >
6.73.1. Description
6.73.2. Key Features
6.73.3. Creating the Component with a Page Tag
6.73.4. Creating the Component Dynamically Using Java
6.73.5. Details of Usage
6.73.6. JavaScript API
6.73.7. Facets
6.73.8. Look-and-Feel Customization
6.73.9. Skin Parameters Redefinition
6.73.10. Definition of Custom Style Classes
6.73.11. Relevant Resources Links
+6.74. < rich:orderingList >
6.74.1. Description
6.74.2. Key Features
6.74.3. Creating the Component with a Page Tag
6.74.4. Creating the Component Dynamically Using Java
6.74.5. Details of Usage
6.74.6. JavaScript API
6.74.7. Facets
6.74.8. Look-and-Feel Customization
6.74.9. Skin Parameters Redefinition
6.74.10. Definition of Custom Style Classes
6.74.11. Relevant Resources Links
+6.75. < rich:paint2D >
6.75.1. Description
6.75.2. Key Features
6.75.3. Creating the Component with a Page Tag
6.75.4. Creating the Component Dynamically Using Java
6.75.5. Details of Usage
6.75.6. Look-and-Feel Customization
6.75.7. Relevant Resources Links
+6.76. < rich:panel >
6.76.1. Description
6.76.2. Key Features
6.76.3. Creating the Component with a Page Tag
6.76.4. Creating the Component Dynamically Using Java
6.76.5. Details of Usage
6.76.6. Facets
6.76.7. Look-and-Feel Customization
6.76.8. Skin Parameters Redefinition
6.76.9. Definition of Custom Style Classes
6.76.10. Relevant Resources Links
+6.77. < rich:panelBar >
6.77.1. Description
6.77.2. Key Features
6.77.3. Creating the Component with a Page Tag
6.77.4. Creating the Component Dynamically Using Java
6.77.5. Details of Usage
6.77.6. Look-and-Feel Customization
6.77.7. Skin Parameters Redefinition
6.77.8. Definition of Custom Style Classes
6.77.9. Relevant Resources Links
+6.78. < rich:panelBarItem >
6.78.1. Description
6.78.2. Key Features
6.78.3. Creating the Component with a Page Tag
6.78.4. Creating the Component Dynamically Using Java
6.78.5. Details of Usage
6.78.6. Facets
6.78.7. Look-and-Feel Customization
6.78.8. Skin Parameters Redefinition
6.78.9. Definition of Custom Style Classes
+6.79. < rich:panelMenu >
6.79.1. Description
6.79.2. Key Features
6.79.3. Creating the Component with a Page Tag
6.79.4. Creating the Component Dynamically Using Java
6.79.5. Details of Usage
6.79.6. JavaScript API
6.79.7. Look-and-Feel Customization
6.79.8. Definition of Custom Style Classes
6.79.9. Relevant Resources Links
+6.80. < rich:panelMenuGroup >
6.80.1. Description
6.80.2. Key Features
6.80.3. Creating the Component with a Page Tag
6.80.4. Creating the Component Dynamically Using Java
6.80.5. Details of Usage
6.80.6. JavaScript API
6.80.7. Look-and-Feel Customization
6.80.8. Skin Parameters Redefinition
6.80.9. Definition of Custom Style Classes
6.80.10. Relevant resources links
+6.81. < rich:panelMenuItem >
6.81.1. Description
6.81.2. Key Features
6.81.3. Creating the Component with a Page Tag
6.81.4. Creating the Component Dynamically Using Java
6.81.5. Details of Usage
6.81.6. Look-and-Feel Customization
6.81.7. Skin Parameters Redefinition
6.81.8. Definition of Custom Style Classes
6.81.9. Relevant resources links
+6.82. < rich:pickList >
6.82.1. Description
6.82.2. Key Features
6.82.3. Creating the Component with a Page Tag
6.82.4. Creating the Component Dynamically Using Java
6.82.5. Details of Usage
6.82.6. Facets
6.82.7. Look-and-Feel Customization
6.82.8. Skin Parameters Redefinition
6.82.9. Definition of Custom Style Classes
6.82.10. Relevant Resources Links
+6.83. < rich:progressBar >
6.83.1. Description
6.83.2. Key Features
6.83.3. Creating the Component with a Page Tag
6.83.4. Creating the Component Dynamically Using Java
6.83.5. Details of Usage
6.83.6. JavaScript API
6.83.7. Facets
6.83.8. Look-and-Feel Customization
6.83.9. Skin Parameters Redefinition
6.83.10. Definition of Custom Style Classes
6.83.11. Relevant Resources Links
+6.84. < rich:scrollableDataTable >
6.84.1. Description
6.84.2. Key Features
6.84.3. Creating the Component with a Page Tag
6.84.4. Creating the Component Dynamically Using Java
6.84.5. Details of Usage
6.84.6. JavaScript API
6.84.7. Facets
6.84.8. Look-and-Feel Customization
6.84.9. Skin Parameters Redefinition
6.84.10. Definition of Custom Style Classes
6.84.11. Relevant Resources Links
+6.85. < rich:separator >
6.85.1. Description
6.85.2. Key Features
6.85.3. Creating the Component with a Page Tag
6.85.4. Creating the Component Dynamically Using Java
6.85.5. Details of Usage
6.85.6. Look-and-Feel Customization
6.85.7. Definition of Custom Style Classes
6.85.8. Relevant Resources Links
+6.86. < rich:simpleTogglePanel >
6.86.1. Description
6.86.2. Key Features
6.86.3. Creating the Component with a Page Tag
6.86.4. Creating the Component Dynamically Using Java
6.86.5. Details of Usage
6.86.6. Facets
6.86.7. Look-and-Feel Customization
6.86.8. Skin Parameters Redefinition
6.86.9. Definition of Custom Style Classes
6.86.10. Relevant Resources Links
+6.87. < rich:spacer >
6.87.1. Description
6.87.2. Key Features
6.87.3. Creating the Component with a Page Tag
6.87.4. Creating the Component Dynamically Using Java
6.87.5. Details of Usage
6.87.6. Look-and-Feel Customization
6.87.7. Relevant Resources Links
+6.88. < rich:suggestionbox >
6.88.1. Description
6.88.2. Key Features
6.88.3. Creating the Component with a Page Tag
6.88.4. Creating the Component Dynamically Using Java
6.88.5. Details of Usage
6.88.6. JavaScript API
6.88.7. Facets
6.88.8. Look-and-Feel Customization
6.88.9. Skin Parameters Redefinition
6.88.10. Definition of Custom Style Classes
6.88.11. Relevant Resources Links
+6.89. < rich:tabPanel >
6.89.1. Description
6.89.2. Key Features
6.89.3. Creating the Component with a Page Tag
6.89.4. Creating the Component Dynamically Using Java
6.89.5. Details of Usage
6.89.6. Look-and-Feel Customization
6.89.7. Skin Parameters Redefinition
6.89.8. Definition of Custom Style Classes
6.89.9. Relevant Resources Links
+6.90. < rich:tab >
6.90.1. Description
6.90.2. Key Features
6.90.3. Creating the Component with a Page Tag
6.90.4. Creating the Component Dynamically Using Java
6.90.5. Details of Usage
6.90.6. Facets
6.90.7. Look-and-Feel Customization
6.90.8. Skin Parameters Redefinition
6.90.9. Definition of Custom Style Classes
+6.91. < rich:togglePanel >
6.91.1. Description
6.91.2. Key Features
6.91.3. Creating the Component with a Page Tag
6.91.4. Creating the Component Dynamically Using Java
6.91.5. Details of Usage
6.91.6. Look-and-Feel Customization
6.91.7. Definition of Custom Style Classes
6.91.8. Relevant Resources Links
+6.92. < rich:toggleControl >
6.92.1. Description
6.92.2. Key Features
6.92.3. Creating the Component with a Page Tag
6.92.4. Creating the Component Dynamically Using Java
6.92.5. Details of Usage
6.92.6. Look-and-Feel Customization
6.92.7. Definition of Custom Style Classes
+6.93. < rich:toolBar >
6.93.1. Description
6.93.2. Key Features
6.93.3. Creating the Component with a Page Tag
6.93.4. Creating the Component Dynamically Using Java
6.93.5. Details of Usage
6.93.6. Facets
6.93.7. Look-and-Feel Customization
6.93.8. Skin Parameters Redefinition
6.93.9. Definition of Custom Style Classes
6.93.10. Relevant Resources Links
+6.94. < rich:toolBarGroup >
6.94.1. Description
6.94.2. Key Features
6.94.3.
6.94.4. Creating the Component with a Page Tag
6.94.5. Creating the Component Dynamically Using Java
6.94.6. Details of Usage
6.94.7. Look-and-Feel Customization
6.94.8. Definition of Custom Style Classes
6.94.9. Relevant resources links
+6.95. < rich:toolTip >
6.95.1. Description
6.95.2. Key Features
6.95.3. Creating the Component with a Page Tag
6.95.4. Creating the Component Dynamically Using Java
6.95.5. Details of Usage
6.95.6. JavaScript API
6.95.7. Facets
6.95.8. Look-and-Feel Customization
6.95.9. Skin Parameters Redefinition
6.95.10. Definition of Custom Style Classes
6.95.11. Relevant Resources Links
+6.96. < rich:tree >
6.96.1. Description
6.96.2. Key Features
6.96.3. Creating the Component with a Page Tag
6.96.4. Creating the Component Dynamically Using Java
6.96.5. Details of Usage
6.96.6. Built-In Drag and Drop
6.96.7. Events handling
6.96.8. Facets
6.96.9. Look-and-Feel Customization
6.96.10. Skin Parameters Redefinition:
6.96.11. Definition of Custom Style Classes
6.96.12. Relevant Resources Links
+6.97. < rich:treeNode >
6.97.1. Description
6.97.2. Key Features
6.97.3. Creating the Component with a Page Tag
6.97.4. Creating the Component Dynamically Using Java
6.97.5. Details of Usage
6.97.6. Built-in Drag and Drop
6.97.7. Events Handling
6.97.8. Facets
6.97.9. Look-and-Feel Customization
6.97.10. Skin Parameters Redefinition
6.97.11. Definition of Custom Style Classes
6.97.12. Relevant Resources Links
+6.98. < rich:changeExpandListener >
6.98.1. Description
6.98.2. Key Features
6.98.3. Creating the Component with a Page Tag
6.98.4. Creating the Component Dynamically Using Java
6.98.5. Details of Usage
6.98.6. Look-and-Feel Customization
+6.99. < rich:nodeSelectListener >
6.99.1. Description
6.99.2. Key Features
6.99.3. Creating the Component with a Page Tag
6.99.4. Creating the Component Dynamically Using Java
6.99.5. Details of Usage
6.99.6. Look-and-Feel Customization
+6.100. < rich:recursiveTreeNodesAdaptor >
6.100.1. Description
6.100.2. Key Features
6.100.3. Creating the Component with a Page Tag
6.100.4. Creating the Component Dynamically Using Java
6.100.5. Details of Usage
6.100.6. Relevant resources links
+6.101. < rich:treeNodesAdaptor >
6.101.1. Description
6.101.2. Key Features
6.101.3. Creating the Component with a Page Tag
6.101.4. Creating the Component Dynamically Using Java
6.101.5. Details of Usage
6.101.6. Relevant Resources Links
7. IDE Support
8. Links to information resources

RichFaces is an open source framework that adds Ajax capability into existing JSF applications without resorting to JavaScript.

RichFaces leverages JavaServer Faces framework including lifecycle, validation, conversion facilities and management of static and dynamic resources. RichFaces components with built-in Ajax support and a highly customizable look-and-feel can be easily incorporated into JSF applications.

RichFaces allows to:

RichFaces UI components come ready to use out-of-the-box, so developers save their time and immediately gain the advantage of the mentioned above features in Web applications creation. As a result, usage experience can be faster and easily obtained.

RichFaces was developed with an open architecture to be compatible with the widest possible variety of environments.

This is what you need to start working with RichFaces 3.3.1:

This chapter describes all necessary actions and configurations that should be done for plugging the RichFaces components into a JSF appplication. The description relies on a simple JSF with RichFaces application creation process from downloading the libraries to running the application in a browser. The process of application creation described here is common and does not depend on used IDE.

The latest release of RichFaces components is available for download at JBoss RichFaces Downloads area at JBoss community. Binary files (uploaded there in *.bin.zip or *.bin.tar.gz archives) contains compiled, ready-to-use version of RichFaces with set of basic skins.

To start with RichFaces in computer file system create new folder with name "RichFaces", download and unzip the archive with binaries there.

For those who want to download and compile the RichFaces by themselfs there is an article at JBoss community that describes the RichFaces repository's structure overview and some aspects of working with it.

"RichFaces Greeter"—the simple application—is hello-world like application but with one difference: the world of RichFaces will say "Hello!" to user first.

Create standard JSF 1.2 project with all necessary libraries; name the project "Greeter" and follow the decription.

After RichFaces libraries where added into the project it is necessary to register them in project web.xml file. Add following lines in web.xml:


...
<!-- Plugging the "Blue Sky" skin into the project -->
<context-param>
   <param-name>org.richfaces.SKIN</param-name>
   <param-value>blueSky</param-value>
</context-param>

<!-- Making the RichFaces skin spread to standard HTML controls -->
<context-param>
      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
      <param-value>enable</param-value>
</context-param>
 
<!-- Defining and mapping the RichFaces filter -->
<filter> 
   <display-name>RichFaces Filter</display-name> 
   <filter-name>richfaces</filter-name> 
   <filter-class>org.ajax4jsf.Filter</filter-class> 
</filter> 
  
<filter-mapping> 
   <filter-name>richfaces</filter-name> 
   <servlet-name>Faces Servlet</servlet-name>
   <dispatcher>REQUEST</dispatcher>
   <dispatcher>FORWARD</dispatcher>
   <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
...

For more information on how to work with RichFaces skins read "Skinnabilty" chapter.

Finally the web.xml should look like this:


<?xml version="1.0"?>
<web-app version="2.5" 
                xmlns="http://java.sun.com/xml/ns/javaee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Greeter</display-name>
  
<context-param>
   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
   <param-value>server</param-value>
</context-param>
  
<context-param>
   <param-name>org.richfaces.SKIN</param-name>
   <param-value>blueSky</param-value>
</context-param>

<context-param>
      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
      <param-value>enable</param-value>
</context-param>
 
<filter> 
   <display-name>RichFaces Filter</display-name> 
   <filter-name>richfaces</filter-name> 
   <filter-class>org.ajax4jsf.Filter</filter-class> 
</filter> 

<filter-mapping> 
   <filter-name>richfaces</filter-name> 
   <servlet-name>Faces Servlet</servlet-name>
   <dispatcher>REQUEST</dispatcher>
   <dispatcher>FORWARD</dispatcher>
   <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
  
<listener>
   <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
  
<!-- Faces Servlet -->
<servlet>
   <servlet-name>Faces Servlet</servlet-name>
   <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
   <load-on-startup>1</load-on-startup>
</servlet>
 
<!-- Faces Servlet Mapping -->
<servlet-mapping>
   <servlet-name>Faces Servlet</servlet-name>
   <url-pattern>*.jsf</url-pattern>
</servlet-mapping>
  
<login-config>
   <auth-method>BASIC</auth-method>
   </login-config>
</web-app>

The "RichFaces Greeter" application has only one JSP page. Create index.jsp page in root of WEB CONTENT folder and add there following code:


<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<!-- RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
 
<html>
      <head>
            <title>RichFaces Greeter</title>
      </head>
      <body>
            <f:view>
                  <a4j:form>
                        <rich:panel header="RichFaces Greeter" style="width: 315px">
                              <h:outputText value="Your name: " />
                              <h:inputText value="#{user.name}" >
                                    <f:validateLength minimum="1" maximum="30" />
                              </h:inputText>
                              
                              <a4j:commandButton value="Get greeting" reRender="greeting" />
                              
                              <h:panelGroup id="greeting" >
                                    <h:outputText value="Hello, " rendered="#{not empty user.name}" />
                                    <h:outputText value="#{user.name}" />
                                    <h:outputText value="!" rendered="#{not empty user.name}" />
                              </h:panelGroup>
                        </rich:panel>
                  </a4j:form>
            </f:view>
      </body>
</html>

The application uses three RichFaces components: <rich:panel> is used as visual container for information; <a4j:commandButton> with built-in Ajax support allows rendering a greeting dynamically after a response comes back and <a4j:form> helps the button to perform the action.

Note, that the RichFaces tag library should be declared on each JSP page. For XHTML pages add following lines for tag library declaration:


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

That’s it. Run the application on server. Point your browser to index.jsp page in browser: http://localhost:8080/Greeter/index.jsf


In this section we will tell how you can create a simple JSF application with RichFaces using Maven.

In the first place you need to make sure that Maven is installed on you local machine. We will run the JSF application on Tomcat 6.0 server, so please download and install it if you haven't done already so.

Now we can move on to creating the application. To create the project structure and fill it with minimal content we will use the "maven-archetype-jsfwebapp" Maven archetype which is a part of RichFaces CDK.

The "maven-archetype-jsfwebapp" archetype and the project itself require extra repositories to be provided, namely "http://snapshots.jboss.org/maven2/" and "http://repository.jboss.com/maven2/". The easiest way to make the repositories visible for Maven is to create a profile in "maven_installation_folder/conf/settings.xml" in <profiles> element. This is the content of the profile:



<profile>
    <id>jsf-app-profile</id>
    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <id>snapshots.jboss.org</id>
            <name>Snapshot Jboss Repository for Maven</name>
            <url>http://snapshots.jboss.org/maven2/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <id>repository.jboss.com</id>
            <name>Jboss Repository for Maven</name>
            <url>http://repository.jboss.com/maven2/</url>
            <layout>default</layout>
        </repository>
    </repositories>
</profile>
 

When the profile is added you need to activate it in the <activeProfiles> element. It can be done like this:


...
<activeProfiles>
  <activeProfile>jsf-app-profile</activeProfile>
</activeProfiles>
...

Now you have everything to create the project using the "maven-archetype-jsfwebapp" archetype. Create a folder that will house your project and run the this command in it:


...
mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=3.3.1-SNAPSHOT -DgroupId=org.docs.richfaces -DartifactId=jsf-app
...

You can adjust some parameters of the command.


This command generates a JSF project that has the following structure:



jsf-app
|-- pom.xml
`-- src
    |-- main
    |   |-- java
    |   |   `-- org
    |   |       `-- docs
    |   |           `-- richfaces
    |   |               `-- Bean.java
    |   |-- resources
    |   `-- webapp
    |       |-- WEB-INF
    |       |   |-- faces-config.xml
    |       |   `-- web.xml
    |       |-- index.jsp
    |       `-- pages
    |           |-- index.jsp
    |           `-- index.xhtml
    `-- test
        `-- java
            `-- org
                `-- docs
                    `-- richfaces
                        `-- BeanTest.java
 

Now go to "jsf-app" folder, it contains a project descriptor(pom.xml). Open the project descriptor to edit and add dependencies to the <dependencies> element. Your <dependencies> element content should be the following:


...
<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>jstl</groupId>
        <artifactId>jstl</artifactId>
        <version>1.1.2</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2_12</version>
    </dependency>
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>1.2_12</version>
    </dependency>
    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>el-impl</groupId>
        <artifactId>el-impl</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>jsr250-api</artifactId>
        <version>1.0</version>
    </dependency>
    <!-- RichFaces libraries -->
    <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-api</artifactId>
        <version>3.3.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-impl</artifactId>
        <version>3.3.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-ui</artifactId>
        <version>3.3.1-SNAPSHOT</version>
    </dependency>
</dependencies>
...

The last three dependences add RichFaces libraries to the project. You can now build the project with the mvn install command.

When you see the "BUILD SUCCESSFUL" message, the project is assembled and can be imported to a IDE and run on the server.

The project can be built for Eclipse IDE with mvn eclipse:eclipse -Dwtpversion=2.0 command.

Then you can import the project into Eclipse. After importing to Eclipse open the "jsf-app/src/main/webapp/WEB-INF/web.xml" to configure it according to the listing in the Registering RichFaces in web.xml section of the guide.

The project is configured and now you can start using RichFaces. Open "jsf-app/src/main/webapp/pages/index.jsp" file and add the tag library declaration.


...
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
...

Add some RichFaces component to the "index.jsp" page, for instance <rich:calendar>. Your "index.jsp" page will look like this:


...
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<html>
    <head>
        <title>JSF Application with RichFaces built by Maven</title>
    </head>
    <body>
        <f:view>
        <rich:calendar />
        </f:view>
    </body> 
</html>  
...

Now run the application on Tomcat server and open it in your favourite browser by pointing it to "http://localhost:8080/jsf-app/" .

JBoss Developer Studio comes with a tight integration with RichFaces component framework. Following links might be useful for those who already use this IDE and RichFaces for developing applications and those who wish to improve their development process:

Read also the quick overview to "Practical RichFaces " book by Max Katz at his blog.

RichFaces comes with support for all tags (components) included in the JavaServer Faces specification. To add RichFaces capabilities to the existing JSF project you should just put the RichFaces libraries into the lib folder of the project and add filter mapping. The behavior of the existing project doesn't change just because of RichFaces.

RichFaces doesn't require any parameters to be defined in your web.xml. But the RichFaces parameters listed below may help with development and may increase the flexibility of RichFaces usage.

Table 4.1. Initialization Parameters

NameDefaultDescription
org.richfaces.SKINDEFAULTIs a name of a skin used in an application. It can be a literal string with a skin name, or the EL expression (#{...}) pointed to a String property (skin name) or a property of a org.richfaces.framework.skin type. Skin in last case, this instance is used as a current skin
org.richfaces.LoadScriptStrategyDEFAULTDefines how the RichFaces script files are loaded to application. Possible values are: ALL, DEFAULT, NONE. For more information see "Scripts and Styles Load Strategy".
org.richfaces.LoadStyleStrategyDEFAULTDefines how the RichFaces style files are loaded to application. Possible values are: ALL, DEFAULT, NONE. For more information see "Scripts and Styles Load Strategy".
org.ajax4jsf.LOGFILEnoneIs an URL to an application or a container log file (if possible). If this parameter is set, content from the given URL is shown on a Debug error page in the iframe window
org.ajax4jsf.VIEW_HANDLERSnoneIs a comma-separated list of custom ViewHandler instances for inserting in chain. Handlers are inserted BEFORE RichFaces viewhandlers in the given order. For example, in facelets application this parameter must contain com.sun.facelets.FaceletViewHandler, instead of declaration in faces-config.xml
org.ajax4jsf.CONTROL_COMPONENTSnoneIs a comma-separated list of names for a component as a special control case, such as messages bundle loader, alias bean components, etc. Is a type of component got by a reflection from the static field COMPONENT_TYPE . For components with such types encode methods always are called in rendering Ajax responses, even if a component isn't in an updated part
org.ajax4jsf.ENCRYPT_RESOURCE_DATAfalseFor generated resources, such as encrypt generation data, it's encoded in the resource URL. For example, URL for an image generated from the mediaOutput component contains a name of a generation method, since for a hacker attack, it is possible to create a request for any JSF baked beans or other attributes. To prevent such attacks, set this parameter to "true" in critical applications (works with JRE > 1.4 )
org.ajax4jsf.ENCRYPT_PASSWORDrandomIs a password for encryption of resources data. If isn't set, a random password is used
org.ajax4jsf.COMPRESS_SCRIPTtrueIt doesn't allow framework to reformat JavaScript files (makes it impossible to debug)
org.ajax4jsf.RESOURCE_URI_PREFIXa4j Defines prefix which is added to all URIs of generated resources. This prefix designed to handle RichFaces generated resources requests
org.ajax4jsf.GLOBAL_RESOURCE_URI_PREFIXa4j/g Defines prefix which is added to URIs of global resources. This prefix designed to handle RichFaces generated resources requests
org.ajax4jsf.SESSION_RESOURCE_URI_PREFIXa4j/s Defines prefix which is used for session tracking for generated resources. This prefix designed to handle RichFaces generated resources requests
org.ajax4jsf.DEFAULT_EXPIRE86400 Defines in seconds how long streamed back to browser resources can be cached
org.ajax4jsf.SERIALIZE_SERVER_STATEfalse If enabled the component state (not the tree) will be serialized before being stored in the session. This may be desirable for applications that may have issues with view state being sensitive to model changes. Instead of this parameter can use com.sun.faces.serializeServerState and org.apache.myfaces.SERIALIZE_STATE_IN_SESSION parameters for corresponding environments.



RichFaces now works out-of-the-box with JBoss Seam and Facelets running inside JBoss AS 4.0.4 and higher. There is no more shared JAR files needed. You just have to package the RichFaces library with your application.

Your web.xml for Seam 1.2 must be like this:


<?xml version="1.0" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
                   version="2.4">

     <!-- richfaces -->

     <filter>
          <display-name>RichFaces Filter</display-name>
          <filter-name>richfaces</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>
     </filter>

     <filter-mapping>
          <filter-name>richfaces</filter-name>
          <url-pattern>*.seam</url-pattern>
     </filter-mapping>

     <!-- Seam -->

     <listener>
          <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
     </listener>

     <servlet>
          <servlet-name>Seam Resource Servlet</servlet-name>
          <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
     </servlet>

     <servlet-mapping>
          <servlet-name>Seam Resource Servlet</servlet-name>
          <url-pattern>/seam/resource/*</url-pattern>
     </servlet-mapping>

     <filter>
          <filter-name>Seam Filter</filter-name>
          <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
     </filter>

     <filter-mapping>
          <filter-name>Seam Filter</filter-name>
          <url-pattern>/*</url-pattern>
     </filter-mapping>

     <!-- MyFaces -->

     <listener>
          <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
     </listener>

     <!-- JSF -->

     <context-param>
          <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
          <param-value>client</param-value>
     </context-param>

     <context-param>
          <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
         <param-value>.xhtml</param-value>
     </context-param>

     <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
     </servlet>

     <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.seam</url-pattern>
     </servlet-mapping>
</web-app>

Seam 2 supports RichFaces Filter. Thus your web.xml for Seam 2 must be like this:


<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
                   xmlns="http://java.sun.com/xml/ns/javaee"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

     <context-param>
          <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
          <param-value>com.sun.facelets.FaceletViewHandler</param-value>
     </context-param>

     <!-- Seam -->

     <listener>
          <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
     </listener>

     <servlet>
          <servlet-name>Seam Resource Servlet</servlet-name>
          <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
     </servlet>

     <servlet-mapping>
          <servlet-name>Seam Resource Servlet</servlet-name>
          <url-pattern>/seam/resource/*</url-pattern>
     </servlet-mapping>

     <filter>
          <filter-name>Seam Filter</filter-name>
          <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
     </filter>

     <filter-mapping>
          <filter-name>Seam Filter</filter-name>
          <url-pattern>/*</url-pattern>
     </filter-mapping>

     <!-- JSF -->

     <context-param>
          <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
          <param-value>.xhtml</param-value>
     </context-param>

     <context-param>
          <param-name>facelets.DEVELOPMENT</param-name>
          <param-value>true</param-value>
     </context-param>

     <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
     </servlet>

     <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.seam</url-pattern>
     </servlet-mapping>
</web-app>

Only one issue still persists while using Seam with MyFaces. Look at myFaces part of this section.

Detailed information on how to integrate Richfaces and Trinidad and how to hide ".seam" postfix in the URL you can find in the RichFaces Cookbook article

Next figure lists several important elements of the RichFaces framework


Ajax Filter.

To get all benefits of RichFaces , you should register a Filter in web.xml file of your application. The Filter recognizes multiple request types. Necessary information about Filter configuration can be found in the "Filter configuration" section. The sequence diagram on Figure 3 shows the difference in processing of a "regular" JSF request and an Ajax request.

In the first case the whole JSF tree will be encoded, in the second one option it depends on the "size" of the Ajax region. As you can see, in the second case the filter parses the content of an Ajax response before sending it to the client side.

Have a look at the next picture to understand these two ways:


In both cases, the information about required static or dynamic resources that your application requests is registered in the ResourseBuilder class.

When a request for a resource comes (Figure 4), the RichFaces filter checks the Resource Cache for this resource and if it is there, the resource is sent to the client. Otherwise, the filter searches for the resource among those that are registered by the ResourceBuilder. If the resource is registered, the RichFaces filter will send a request to the ResourceBuilder to create (deliver) the resource.

Next Figure shows the ways of resource request processing.


AJAX Action Components

There are Ajax Action Components: <a4j:commandButton> , <a4j:commandLink> , <a4j:poll> and <a4j:support> and etc. You can use them to send Ajax requests from the client side.

AJAX Containers

AjaxContainer is an interface that describes an area on your JSF page that should be decoded during an Ajax request. AjaxViewRoot and AjaxRegion are implementations of this interface.

JavaScript Engine

RichFaces JavaScript Engine runs on the client-side. It knows how to update different areas on your JSF page based on the information from the Ajax response. Do not use this JavaScript code directly, as it is available automatically.

The RichFaces comes with a number of integral parts (framework, libraries):

For more information about framework and libraries loading see the following section in the FAQ.

Note:

In order to prevent JavaScript versions conflict you should use only one version of the framework or library. You could find more information about libraries exclusion in the FAQ.

Ajax attributes are common for Ajax components such as <a4j:support> , <a4j:commandButton> , <a4j:jsFunction> , <a4j:poll> , <a4j:push> and so on. Also, most RichFaces components with built-in Ajax support have these attributes for a similar purpose. Ajax components attributes help RichFaces to expose its features. Most of the attributes have default values. Thus, you can start working with RichFaces without knowing the usage of these attribute. However, their usage allows to tune the required Ajax behavior very smoothly.

"reRender" is a key attribute. The attribute allows to point to area(s) on a page that should be updated as a response on Ajax interaction. The value of the "reRender" attribute is an id of the JSF component or an id list.

A simple example is placed below:


...
<a4j:commandButton value="update" reRender="infoBlock"/>
...
<h:panelGrid id="infoBlock">
    ...
</h:panelGrid>
...

The value of "reRender" attribute of the <a4j:commandButton> tag defines which part(s) of your page is (are) to be updated. In this case, the only part of the page to update is the <h:panelGrid> tag because its ID value matches to the value of "reRender" attribute. As you see, it's not difficult to update multiple elements on the page, only list their IDs as the value of "reRender" .

"reRender" uses UIComponent.findComponent() algorithm (with some additional exceptions) to find the component in the component tree. As can you see, the algorithm presumes several steps. Each other step is used if the previous step is not successful. Therefore, you can define how fast the component is found mentioning it more precisely. The following example shows the difference in approaches (both buttons will work successfully):


...
<h:form id="form1">
    ...
    <a4j: commandButton value="Usual Way" reRender="infoBlock, infoBlock2" />
    <a4j:commandButton value="Shortcut" reRender=":infoBlockl,:sv:infoBlock2" />
    ...
</h:form>
<h:panelGrid id="infoBlock">
    ...
</h:panelGrid>
...
<f:subview id="sv">
    <h:panelGrid id="infoBlock2">
        ...
    </h:panelGrid>
    ...
</f:subview>
...

It's also possible to use JSF EL expression as a value of the reRender attribute. It might be a property of types Set, Collection, Array or simple String. The EL for reRender is resolved right before the Render Response phase. Hence, you can calculate what should be re-rendered on any previous phase during the Ajax request processing.

Most common problem with using reRender is pointing it to the component that has a "rendered" attribute. Note, that JSF does not mark the place in the browser DOM where the outcome of the component should be placed in case the "rendered" condition returns false. Therefore, after the component becomes rendered during the Ajax request, RichFaces delivers the rendered code to the client, but does not update a page, because the place for update is unknown. You need to point to one of the parent components that has no "rendered" attribute. As an alternative, you can wrap the component with <a4j:outputPanel> layout="none" .

"ajaxRendered" attribute of the <a4j:outputPanel> set to "true" allows to define the area of the page that will be re-rendered even if it is not pointed in the reRender attribute explicitly. It might be useful if you have an area on a page that should be updated as a response on any Ajax request. For example, the following code allows to output error messages regardless of what Ajax request causes the Validation phase failed.


...
<a4j:outputPanel ajaxRendered="true">
    <h:messages />
</a4j:outputPanel>
...

"limitToList" attribute allows to dismiss the behavior of the <a4j:outputPanel> "ajaxRendered" attribute. limitToList = "false" means to update only the area(s) that mentioned in the "reRender" attribute explicitly. All output panels with ajaxRendered="true" is ignored. An example is placed below:


...
<h:form>
    <h:inputText value="#{person.name}">
        <a4j:support event="onkeyup" reRender="test" limitToList="true"/>
    </h:inputText>
    <h:outputText value="#{person.name}" id="test"/>
</form>
...

"eventsQueue" attribute defines the name of the queue that will be used to order upcoming Ajax requests. By default, RichFaces does not queue Ajax requests. If events are produced simultaneously, they will come to the server simultaneously. JSF implementations (especially, the very first ones) does not guaranty that the request that comes first will be served or passed into the JSF lifecycle first. The order how the server side data will be modified in case of simultaneous request might be unpredictable. Usage of eventsQueue attribute allows to avoid possible mess. Define the queue name explicitly, if you expect intensive Ajax traffic in your application.

The next request posted in the same queue will wait until the previos one is not processed and Ajax Response is returned back if the "eventsQueue" attribute is defined. In addition, RichFaces starts to remove from the queue "similar" requests. "Similar'"requests are the requests produced by the same event. For example, according to the following code, only the newest request will be sent to the server if you type very fast and has typed the several characters already before the previous Ajax Response is back.


...
<h:inputText value="#{userBean.name}">
    <a4j:support event="onkeyup" eventsQueue="foo" reRender="bar" />
</h:inputText>
...

"requestDelay" attribute defines the time (in ms) that the request will be wait in the queue before it is ready to send. When the delay time is over, the request will be sent to the server or removed if the newest "similar" request is in a queue already .

"ignoreDupResponses" attribute orders to ignore the Ajax Response produced by the request if the newest "similar" request is in a queue already. ignoreDupResponses"="true" does not cancel the request while it is processed on the server, but just allows to avoid unnecessary updates on the client side if the response loses the actuality.

Defining the "eventsQueue" along with "requestDelay" allows to protect against unnecessary traffic flood and synchronizes Ajax requests order. If you have several sources of Ajax requests, you can define the same queue name there. This might be very helpful if you have Ajax components that invoke request asynchronously from the ones produced by events from users. For example, <a4j:poll> or <a4j:push> . In case the requests from such components modify the same data, the synchronization might be very helpful.

More information can be found on the RichFaces Users Forum .

"timeout" attribute is used for setting response waiting time on a particular request. If a response is not received during this time, the request is aborted.

Starting from 3.3.0 version RichFaces has an improved queue.

There are some reasons why the queue has been improved. In previous versions the queue had quite simple implementation: it sent to the server only the last Ajax request out of all requests coming in the queue during request delay.

The improved queue allows to

There are 4 types of the queue:

In this section we will take a closer look at the listed above types of the queue and see in more detail how they differ. Usage details are covered in the <a4j:queue> chapter.

Design details

The view scoped default, named and formed-based types of queue utilize the <a4j:queue> tag to override the settings of the global queue defined in the web.xml file.

You can also programmatically enable/disable the global queue on a single view using the following:


...
<a4j:queue name="org.richfaces.global_queue" disabled="true"... />
...

Hence, to enable the queue for a single view page you need to define the "disable" attribute with "false".

Now, you can override the default settings using the attributes of the <a4j:queue> component. The full list of attributes is given in the "6.20. <a4j:queue>" chapter of the guide.

Example:


...
<a4j:queue name="org.richfaces.global_queue" requestDelay="1000" />
...

View scoped queue can be also added by just definition of the queue without name specified. In this case it should be placed anywhere outside the forms in order not to be recognized as a form-based queue.


...
<a4j:queue ... />
...

This section will cover some queue's functionality aspects.

RichFaces uses form based approach for Ajax request sending. This means each time, when you click an Ajax button or <a4j:poll> produces an asynchronous request, the data from the closest JSF form is submitted with the XMLHTTPRequest object. The form data contains the values from the form input element and auxiliary information such as state saving data.

When "ajaxSingle" attribute value is "true" , it orders to include only a value of the current component (along with <f:param> or <a4j:actionparam> values if any) to the request map. In case of <a4j:support> , it is a value of the parent component. An example is placed below:


...
<h:form>
    <h:inputText value="#{person.name}">
        <a4j:support event="onkeyup" reRender="test" ajaxSingle="true"/>
    </h:inputText>
    <h:inputText value="#{person.middleName}"/>
</form>
...

In this example the request contains only the input component causes the request generation, not all the components contained on a form, because of ajaxSingle="true" usage.

Note, that ajaxSingle="true" reduces the upcoming traffic, but does not prevent decoding other input components on the server side. Some JSF components, such as <h:selectOneMenu> do recognize the missing data in the request map value as a null value and try to pass the validation process with a failed result. Thus, use <a4j:region> to limit a part of the component tree that will be processed on the server side when it is required.

"immediate" attribute has the same purpose as any other non-JSF component. The default "ActionListener" should be executed immediately (i.e. during the Apply Request Values phase of a request processing lifecycle), rather than waiting until the Invoke Application phase. Using immediate="true" is one of the ways to have some data model values updated when other cannot be updated because of a problem with passing the Validation phase successfully. This might be important inside the <h:dataTable> like components where using <a4j:region> is impossible due to the <h:dataTable> component architecture.

"bypassUpdates" attribute allows to bypass the Update Model phase. It might be useful if you need to check your input against the available validator, but not to update the model with those data. Note, that an action will be invoked at the end of the Validation phase only if the Validation phase is passed successfully. The listeners of the Application phase will not be invoked in any case.

Ajax component is similar to any other non-Ajax JSF component like <h:commandButton> . It allows to submit the form. You can use "action" and "actionListener" attributes to invoke the action method and define the action event.

"action" method must return null if you want to have an Ajax Response with a partual page update. This is regular mode called "Ajax request generates Non-Ajax Response". In case of action does not return null, but the action outcome that matches one of navigation rules, RichFaces starts to work in "Ajax request generates Non-Ajax Response" mode. This mode might be helpful in two major cases:

RichFaces allows writing Ajax-enabled JSF application without writing any Javascript code. However, you can still invoke the JavaScript code if you need. There are several ajax attributes that helps to do it.

"onsubmit" attribute allows to invoke JavaScript code before an Ajax request is sent. If "onsubmit" returns "false" , the Ajax request is canceled. The code of "onsubmit" is inserted before the RichFaces Ajax call. Hence, the "onsubmit" should not has a "return" statement if you want the Ajax request to be sent. If you are going to invoke a JavaScript function that returns "true" or "false" , use the conditional statement to return something only when you need to cancel the request. For example:


...
onsubmit="if (mynosendfunct()==false){return false}"
...

"onclick" attribute is similar to the "onsubmit" , but for clickable components such as <a4j:commandLink> and <a4j:commandButton> . If it returns "false" , the Ajax request is canceled also.

The "oncomplete" attribute is used for passing JavaScript that would be invoked right after the AJAX response returns back and DOM is updated. It is not recommended to use use keyword this inside the EL-expression, because it will not always point to the component where AJAX request was initiated.

"onbeforedomupdate" attribute defines JavaScript code for call after Ajax response receiving and before updating DOM on a client side.

"data" attribute allows to get the additional data from the server during an Ajax call. You can use JSF EL to point the property of the managed bean and its value will be serialized in JSON format and be available on the client side. You can refer to it using the "data" variable. For example:


...
<a4j:commandButton value="Update" data="#{userBean.name}" oncomplete="showTheName(data.name)" />
...

RichFaces allows to serialize not only primitive types into JSON format, but also complex types including arrays and collections. The beans should be serializable to be refered with "data" .

There is a number of useful functions which can be used in JavaScript:

"status" attribute for Ajax components (such as <a4j:commandButton> , <a4j:poll> , etc.) points to an ID of <a4j:status> component. Use this attribute if you want to share <a4j:status> component between different Ajax components from different regions. The following example shows it.


...
<a4j:region id="extr">
    <h:form>
        <h:outputText value="Status:" />
        <a4j:status id="commonstatus" startText="In Progress...." stopText=""/>
        <h:panelGrid columns="2">
            <h:outputText value="Name"/>
            <h:inputText id="name" value="#{userBean.name}">
                <a4j:support event="onkeyup" reRender="out" />
            </h:inputText>
            <h:outputText value="Job"/>
            <a4j:region  id="intr">
                <h:inputText id="job" value="#{userBean.job}">
                    <a4j:support event="onkeyup"  reRender="out" status="commonstatus"/>
                </h:inputText>
            </a4j:region>
        </h:panelGrid>
        <a4j:region>
            <h:outputText id="out" value="Name: #{userBean.name}, Job: #{userBean.job}" />
            <br />
            <a4j:commandButton ajaxSingle="true" value="Clean Up Form" reRender="name, job, out"  status="commonstatus">
                <a4j:actionparam name="n" value=""  assignTo="#{userBean.name}" />
                <a4j:actionparam name="j" value=""  assignTo="#{userBean.job}" />
            </a4j:commandButton>
        </a4j:region>
    </h:form>
</a4j:region>
...

In the example <a4j:support> and <a4j:commandButton> are defined in different regions. Values of "status" attribute for these components points to an ID of <a4j:support> .Thus, the <a4j:support> component is shared between two components from different regions.

More information could be found on the RichFaces Live Demo .

Other useful attribute is "focus" . It points to an ID of a component where focus will be set after an Ajax request.

RichFaces uses a filter for a correction of code received on an Ajax request. In case of a "regular" JSF request a browser makes correction independently. In case of Ajax request in order to prevent layout destruction it's needed to use a filter, because a received code could differ from a code validated by a browser and a browser doesn't make any corrections.

An example of how to set a Filter in a web.xml file of your application is placed below.

Example:


...
<filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
...

From RichFaces 3.2 filter configuration becomes more flexible. It's possible to configure different filters for different sets of pages for the same application.

The possible filter types are:

  • TIDY

"TIDY" filter type based on the Tidy parser. This filter is recommended for applications with complicated or non-standard markup when all necessary code corrections are made by the filter when a response comes from the server.

"NEKO" filter type corresponds to the former "Fast Filter" and it's based on the Neko parser. In case of using this filter code isn't strictly verified. Use this one if you are sure that your application markup is really strict for this filter. Otherwise it could cause lot's of errors and corrupt a layout as a result. This filter considerably accelerates all Ajax requests processing.

No correction.

An example of configuration is placed below.

Example:


...
<context-param>
    <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
    <param-value>NONE,NEKO,TIDY</param-value>
</context-param>
<context-param>
    <param-name>org.ajax4jsf.xmlparser.NONE</param-name>
    <param-value>/pages/performance\.xhtml,/pages/default.*\.xhtml</param-value>
</context-param>
<context-param>
    <param-name>org.ajax4jsf.xmlparser.NEKO</param-name>
    <param-value>/pages/repeat\.xhtml</param-value>
</context-param>
<filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
</filter-mapping>
...

The example shows that ORDER parameter defines the order in which particular filter types are used for pages code correction.

First of all "NONE" type is specified for the filter. Then two different sets of pages are defined for which two filter types (NONE and NEKO) are used correspondingly. If a page relates