Using templates

Templates enable you to further control the appearance of your ZIETrans application by customizing a template to match the style of your corporate Web site or applications, or other guidelines. A template is a JSP file in ZIETrans Web projects. Templates have an area reserved for the host screen that is rendered by a ZIETrans transformation. They can contain company logos and information and, in the case of ZIETrans Web templates, links to other Web pages. A template also defines the background color, image, or both, for the area where the transformed host screen appears.

Launching the ZIETrans Template wizard enables you to create a blank template or a template based on one of those shipped with ZIETrans. For ZIETrans Web projects you can also base a template on a Web page (URL or file). You may want to import an existing Web page as a template based on your company's Web site.

ZIETrans supplies templates that you can use in your projects. You can see the names of these templates by expanding the Web Content , folder then selecting the Templates folder in the ZIETrans Projects view. The supplied templates include some or all of the following definitions:
  • Default background colors
  • Default foreground colors
  • Default color mappings to map host colors to GUI colors
  • Default fonts
  • An area for the host screen rendered with a transformation
  • For Web templates
    • Style attributes for widgets
    • Image definitions created using the .gif, .jpg, and .png files located in the Web Content/Common/Images folder
    • The ZIETrans default application keypad
  1. Newly supplied templates are marked with an asterisk on the Template tab of the Project Settings editor.
  2. When you create a ZIETrans project and select Optimize options for mobile devices, only templates that are optimized for mobile devices are provided for use in the project.
You can make copies of ZIETrans resources in the ZIETrans Projects view by opening any folder and right-clicking on the resource and selecting Copy. Choose the folder where you want to Paste the resource and ZIETrans will prompt you for a name. This can be useful as backup when you begin creating your own templates.
Note: You can not copy from the ZIETrans Projects view into the Navigator view.

When you create your project in ZIETrans Toolkit, you select a template to use as the default template for your project. This template is shown in the ZIETrans Projects view with a different icon and the word default next to it. You can change the default template by going to the ZIETrans Projects view and right-clicking on a template located in Web Content/Templates , and select Set as Default Template. Another way is by double-clicking on the Project Settings of your ZIETrans project in the ZIETrans Projects view. Go to the Template tab and make your selection for the list.

When you create screen customizations, and the action is to apply a transformation or show URL, you can select the template to use when the transformation is applied. To make your host application consistent across all screens, you can use the same template for your transformation that you selected for your project default template. To do this, select the template that you want to use as the default template for this project.