Chapter 8. Migrating from RichFaces 4 to RichFaces 4.5

RichFaces 4.5.2 is distributed with this release of JBoss Web Framework Kit. Information is provided here for migrating applications from RichFaces 4 to RichFaces 4.5.
  • A bug in Mojarra affects the ExtendedPartialViewContext in RichFaces 4.5. A check has been implemented to verify that you are running a patched version of Mojarra ≥ 2.1.28 or ≥ 2.2.6. Red Hat JBoss Enterprise Application Platform 6.1 and later are not affected by this bug.
  • RichFaces 4.5 introduces a new syntax to access the JavaScript API of components to avoid confusion with the jQuery $ global, as shown in the table below. A function alias is provided to ease the migration process, however using the deprecated RichFaces.$ syntax will generate a warning in the javascript console.

    Table 8.1. 

    Before RichFaces 4.5 After RichFaces 4.5
    RichFaces.$('componentIdInHtmlPage')
    RichFaces.component('componentIdInHtmlPage')
  • RichFaces 4.5 extends the built-in sorting and filtering capabilities of the ExtendedDataTable to the simpler DataTable and CollapsibleSubTable. If you have existing applications using custom controls, you must either remove the custom controls in favor of the built-in controls or disable the built-in controls. For more information, see RichFaces Component Reference Guide: Built-in filter controls.
  • The rich:fileUpload component is no longer compatible with desktop browser Internet Explorer 9.
  • If you use the RichFaces CDK to build custom components, you must change your maven configuration. The CDK maven build now requires a two step process:
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>precompile-sources-for-cdk</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.richfaces.cdk</groupId>
        <artifactId>richfaces-cdk-maven-plugin</artifactId>
        <version>${org.richfaces.cdk.version}</version>
        <executions>
          <execution>
            <id>cdk-generate-sources</id>
            <phase>process-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>