To consider Before Upgrade
JSP Deprecation
JSF 2 specification deprecates JSP as a view definition language. And all the new components and most of the features do not works for JSP VDL in JSF 2 itself. So RichFaces 4 decided to drop that support starting from the first 4.0.0.Final version. So you have to use JSF 2 Facelets VDL.
Usage with Seam
Seam 2 is not compatible with JSF 2. So if you evaluating RichFaces 4 and planning to estimate/review project migration to RichFaces 4 you should consider migration to Weld/Seam 3 also.
Libraries updates
Maven based projects
How to add RichFaces 4.x to maven based project
Projects without Maven dependencies management
How to add RichFaces 4.x to projects not based on maven
Application Descriptors updates
Web Application Descriptor
- RichFaces Filter not needed anymore as RichFaces 4 uses JSF 2 System Events for configuration and requests handling.
- remove org.ajax4jsf.VIEW_HANDLERS context parameter. it was needed to configure facelets view handler for JSF 1.2 only.
- Check the next table to learn about context-parameters changes:
TABLE TBD
Name 3.3.x | Name 4.x | DEFAULT | Description/Comments |
---|---|---|---|
org.richfaces.<name> | org.richfaces.<name> | ||
SKIN | skin | DEFAULT | default application skin |
BASE_SKIN | baseSkin | - | base skin for current skin |
CONTROL_SKINNING | enableControlSkinning | true | enables stylesheets with standard skinning classes. |
CONTROL_SKINNING_CLASSES | enableControlSkinningClasses | false | enables stylesheets with predefined skinning classes for explicit usage on the component and containers definitions. |
CONTROL_SKINNING_LEVEL | - | Not going to be migrated becase old browsers support (IE 6, Safary 2..) dropped | |
LoadScriptStrategy | resourceOptimization.enabled | false | The Resource Loading Strategies has been re-introduced as Resource Optimization feature |
LoadStyleStrategy | resourceOptimization.enabled | false | The Resource Loading Strategies has been re-introduced as Resource Optimization feature |
org.ajax4jsf.<name> | org.ajax4jsf.<name> | ||
LOGFILE | |||
VIEW_HANDLERS | |||
CONTROL_COMPONENTS | |||
ENCRYPT_RESOURCE_DATA | |||
ENCRYPT_PASSWORD | |||
COMPRESS_SCRIPT | - | resource compression can be enabled using Resource Optimization feature | |
COMPRESS_STYLE | - | resource compression can be enabled using Resource Optimization feature | |
RESOURCE_URI_PREFIX | |||
SESSION_RESOURCE_URI_PREFIX | |||
DEFAULT_EXPIRE | |||
SERIALIZE_SERVER_STATE | |||
JSF Faces-Config
- At first declare your faces-configs as JSF 2 faces-config files by changing its version <faces-config xmlns="http://java.sun.com/xml/ns/javaee" version="2.0">
- Remove facelets view handler definition as it needed only to configure facelets in JSF 1.2
Components Namespaces updates
The namespace and library inclusions are the same as those for previous versions of RichFaces.
The RichFaces namespaces need to be declared in the project's XHTML pages.
<ui:composition xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> ... </ui:composition>
Comments