16. Managing and Deploying Applications : How You Can Apply Template Changes to Frames and Fields : Apply Alternate Templates to Frames or Fields Using the ApplyTemplate Utility
 
Share this page                  
Apply Alternate Templates to Frames or Fields Using the ApplyTemplate Utility
The easiest method of accessing the ApplyTemplate utility is from the Develop tab.
To use the ApplyTemplate utility
1. Select the application to which you want to apply changes in the Applications portlet of the Develop tab.
2. Click Tools, Apply Templates.
The Apply dialog appears.
3. Set parameters for the specified application.
See the descriptions for each of these parameters in Parameters for the ApplyTemplate Utility.
4. Click Go.
The Apply Template Utility dialog appears:
This dialog contains two columns:
Source column
Is used to select the template whose changes are to be applied
Destination column
Is used to select the frames targeted by the operations
The Applications list box displays all the applications in the database that contain frames that have been generated by predefined templates (or contain frames containing fields generated by templates if you select the Field Templates option).
To use the Apply Template Utility dialog
Note:  If you want to apply changes to frames that you have created, start with Step 2.
1. Click the Fields button if you want to apply changes to fields.
2. Select the desired application in the database in the Applications list field.
Depending on whether the Frame Templates or Field Templates option is selected, when an application is selected, the Frame Templates (or Field Templates) list field is populated with the names of the frame templates (or field templates) that have been used to generate frames (or fields) in the selected application.
3. Select a template from the Frame Templates (or Field Templates) list.
If the Frame Templates option is selected, the Frames list field is populated with a list of all frames in the application that have been generated from this template.
If the Field Templates option is selected, the Frames list field is populated with a list of all frames in the application containing fields that have been generated from this template.
4. Select one or more frames from the Frames list in which changes are to be applied.
You can use the Select All and Clear All buttons to select all frames or clear all frames, respectively.
5. Select the mode of operation in which the ApplyTemplate utility is to be run, including one of the following:
Batch
Specifies that the frame or field changes are applied automatically based on the assistant procedure coded by the developer
Interactive
Specifies that the appropriate frame or field assistant dialog is called so that you can enter your own customization parameters associated with the frame or field
6. Click Apply.
The static properties of the frame (or field) template are applied to the target frame or frames; and if appropriate, the corresponding frame assistant or field assistant is called.
The modifications are made to the application's components in the database. If you want these changes to be applied to images that have been previously created, you need to run the MakeImage utility (see Use the MakeImage Utility) again to create a new image.
For more information about how to ensure compatibility between the ApplyTemplate utility and your assistant procedures, see the chapter "Writing a Template Assistant" in the Programming Guide. This chapter also provides guidelines on how a frame is partitioned, and which areas developers can customize without being affected by future regeneration of the dynamic portions of the frame.