Migrating JavaServer Faces resources with Faces Client Components

If you created projects in WebSphere Studio V5.1.x containing Faces Client Components in JavaServer Faces JavaServer Pages (JSPs), migrate the runtime resources of the Faces Client Components to the latest levels.

After opening in V6.0 a project containing JavaServer Faces JSPs with Faces Client Components created in WebSphere Studio V5.1.x, do the following in order to migrate the runtime resources of Faces Client Components:

  1. Create a new JSP file, and for the model select Basic with client-side data caching. This JSP is only needed temporarily in order to cause Rational Web Developer to migrate all the system Java archive (JAR) files to the latest levels.

  2. You will be prompted that you can migrate the project runtime resources to the latest levels. Select Yes to complete the migration process. Important: If you select No, or cancel the dialog box, your project's Faces Client Components will not be migrated to the latest levels and you will not get prompted again, causing several serious issues between the new tooling and the old runtime JAR files.

  3. After creating the new JSP file, you can delete it from the project.

  4. Select any data object in the Client Data area, right click and select Configure. On the Advanced tab select Regenerate All, which will regenerate all your mediators.

    Note: Do not use the Regenerate from server-side data button. You must use Regenerate All.

  5. There are WebSphere Data Objects (WDO) schema elements in version 5.12 that are no longer used in version 6.0. The mediator classes for these elements will not be regenerated and will continue to have compile errors. These mediators will have the naming convention *_DataGraphSchema_wdo4js_*.java. Delete these mediator classes from your project to prevent these compile errors.

Note: Prior to following the steps described above to migrate your projects created in WebSphere Studio V5.1.x containing Faces Client Components in JavaServer Faces JSPs, if you are using a non-English locale, you may see error messages such as failed to build project <name> because class/file <classname> could not be read when the projects are loaded into V6.0. These error messages will stop once you regenerate your client-data by following the steps described above.

Upgrading to automated Diff handlers and processors: Diff processors and handlers are now automatically generated. If you wrote Diff handlers and processors for your Faces Client Components in WebSphere Studio V5.1.x, it is recommended that you discard that code and use the automatically generated processors and handlers. To do so, you need to do the following steps:

  1. Generate the new Diff handlers and processors. To do so, on each Client Data Object in your project do the following:

    1. Select the Client Data Object, right-click and select Configure.

    2. On the Advanced tab, select Regenerate All.

  2. Remove the code you wrote to invoke your Diff processor and handlers, since the generated processors and handlers are invoked automatically. A typical example of where this code was used would be for the Command event for the Command Button component. The following is an example of how the code might look:
    String Diff = getClientData1().getDiffStr();
    if (DiffProcessor.Synch(getRoot(), Diff) == true)
     return "";
    return "failure";

  3. Remove from your project the files corresponding to the old custom handlers and processors you created.

Keeping custom Diff handlers and processors written for V5.1.x: Although this is not recommended, if you decide you need to keep your custom Diff handlers and processors from V5.1.x, they will need to be modified in order to work in V6.0, as the DiffHandler interface and DiffInfo class have changed.

Changes to Faces Client Components in V6.0:

 

Parent topic

Migrating from WebSphere Studio V5.1, 5.1.1, or 5.1.2

 

Related tasks

Migrating Faces resources in a portlet project