OEPE provides refactoring options to rename, move, and delete the ADF components that your application uses. These refactoring options synchronize your changes with other parts of the application that are dependent on the changes.
This section describes the refactoring options available for ADF pages. Table: Refactoring Options Available for ADF Pages lists each refactoring operation and what components are consequently modified.
Refactoring Options Available for ADF Pages
| Refactoring Operation | Components Modified |
|---|---|
|
Renaming a page file |
|
|
Moving a page to a different folder |
|
|
Deleting a page file |
The corresponding page definition file and the entry for the page definition in the CPX file are deleted Note: If there are invalid references, an error message is displayed |
|
Deleting a folder containing a page |
The corresponding page definition files and the entries for the page definitions in the CPX file are deleted |
|
Renaming a folder containing a page |
|
Table: Refactoring Options for ADF Task Flow Configuration Files describes the refactoring options available for ADF task flow configuration files. The following content lists each refactoring operation and what components are consequently modified.
Refactoring Options for ADF Task Flow Configuration Files
| Refactoring Operation | Components Modified |
|---|---|
|
Renaming the task-flow-id tag of a bounded task flow |
|
|
Renaming the task flow configuration file |
|
|
Renaming the task-flow-activity id attribute for view and taskflow call activities |
References to |
|
Renaming task flow id |
ID reference in page definition |
|
Renaming a folder containing a task flow |
|
|
Moving a task flow |
|
|
Deleting a task flow |
Entry in page definition file deleted |
OEPE support for refactoring a Java class includes all changes except those noted in Table: Refactoring Operations on Managed Beans, which lists each refactoring operation on managed beans and components consequently modified.
Refactoring Operations on Managed Beans
| Refactoring operation on Managed Bean | Components Modified |
|---|---|
|
Moving to a different package |
Class name in the managed bean definition in the corresponding configuration file |
|
Deleting the Java class |
|
|
Renaming the name of the managed bean in the configuration file |
References to the managed bean in all pages |
|
Deleting the name of the managed bean or the managed bean itself |
Reference to the managed bean in all pages |
|
Renaming a property of the managed bean |
|
|
Renaming a Java class that is the type for a managed property in a JSF/ADF managed bean |
|
This section describes the refactoring options available for ADF data binding artifacts. Table: Refactoring Operations and Modified Components lists each refactoring operation and what components are consequently modified.
Refactoring Operations and Modified Components
| Refactoring Operation | Components Modified |
|---|---|
|
Moving datacontrols.dcx to another package under the adfmsrc folder |
|
|
Renaming or moving a folder containing a data control file |
|
|
Changing the Id within a data control |
|
|
Moving |
|
|
Renaming or moving a folder containing an ADFm file ( |
|
|
Changing the data control ID in the data control usages section of an ADFm file ( |
|
|
Renaming or moving a page definition file |
|
|
Renaming or moving a folder containing a page definition file |
|
The string externalization feature in OEPE enables you to extract strings from JSF pages and externalize them in resource bundles. The strings are then substituted by the corresponding EL expression. By externalizing strings, the text can be translated in different languages.
To externalize strings:
In the Project Explorer, right-click the page you want to extract strings from. In the context menu, choose Source > Externalize Strings.
In the Externalize Strings dialog, select the strings you want to externalize. The Externalize Strings dialog contains the following options:
Enter common prefix for generated keys: Specifies an optional prefix for all newly generated key. A good practice is to use the name of the JSF page to ensure that entries in the property files can be easily grouped.
Strings to externalize: Displays the list of all strings in the file.
Externalize: Marks the selected strings to be externalized. Externalized strings will be placed in a property file. In the code, the string is substituted by its corresponding EL expression.
Ignore: Marks the selected strings to be ignored from externalization.
Edit: Opens a dialog to enter a new value and key.
Context: Displays the occurrence of the string in the context of the page.
Bundle Property File: Select a property bundle file. If a properties file has not been created previously, OEPE creates called messages.properties.
Click Next.
In the next page of the wizard, confirm the changes to be performed after reviewing the original source and the refactored source.
Click Finish.
If you have tags on your page with missing IDs, you can add and refactor your ADF tags using the Fix ADF Component IDs feature from your page editor.
To add and refactor ADF tag IDs:
With the focus on your page, right-click and choose Source > Fix ADF Component IDs.
A refactoring diff window comes up and shows you the code before and after the refactor operation. Inspect the changes to ensure correctness, then click Finish.