Updating your project's template
- A template containing the static content of the page, such as a company logo, the name of the company, and navigational links (for Web applications).
- A transformed screen, representing a screen in the host application, on which a user enters and views data
A template allows you to control the overall appearance of your application. A template is a JSP file in HATS Web projects or a Java™ Standard Widgets Toolkit (SWT) composite class in HATS rich client projects.
Review the examples of transformed screens in A HATS 3270 example and A HATS 5250 example. In the Web example, the transformed screen includes three main areas: a graphic title banner, a vertical navigation bar which contains application keypad buttons, and the host information area. In the rich client example, the transformed screen includes a horizontal banner, a toolbar which contains application keypad buttons, and the host information area. The template provides a consistent appearance for the pages in an application and enables you to personalize your HATS application. You can use the same template in more than one application.
Although every screen in your application will normally use the same template, you can define a screen event so that it applies a transformation that uses a different template. The new template applies to host screens matching the screen event. (See Working with screen events for more information about screen events.)
You can either modify a template that comes with HATS or create a new template. Launching the Create a Template wizard allows you to create a blank template, a template based off one of the templates shipped with HATS, or a Web page (Web projects only). For your HATS Web projects, you may want to create a template based off your company's Web site.
- In the HATS Projects view, click the plus sign
to expand the resources for the project. - Double-click Project Settings to open the project editor.
- Click the Template tab at the bottom of the project editor to view the Template page.
- Review the templates provided with the HATS Toolkit and select the one that most closely resembles the way you want your application to look. Save your changes.
- Use the editor to modify the template. To open the editor, expand your project in the HATS Projects view. For Web projects, expand the Web Content and Templates folders. For rich client projects, expand the Rich Client and Templates folders. Double-click the name of the template you want to modify.
You can also change the default project template by expanding the Templates folder. Right-click on the desired template and select Set as Default Template.