Modify a HATS project

 

  1. Overview
  2. Connections
  3. Template
  4. Default rendering
  5. Global rules
  6. Text replacement
  7. Host Components and widgets
  8. Components
  9. Widgets
  10. Application keypad
  11. Host keypad
  12. Events
  13. Other
  14. Keyboard support
  15. Client locale
  16. Connection Parameter Override
  17. Asynchronous Update
  18. Applet settings
  19. Global Variable Overrides
  20. Source
  21. Using HATS preferences

 

Overview

When you created your project using the HATS Create a Project wizard, the settings you chose on the panels were saved in a project application (.hap) file. Use the project editor to view and modify those settings. You can invoke the project editor by double-clicking on the Project Settings under the name of the project you want to modify in the HATS Project View tab of the HATS Studio.

The settings displayed in the project editor are the settings that are used for the entire project. If you want to modify any of the settings, you can use the tabs of the project editor. Saved changes made in the project editor are automatically recognized when using Run on Server (by clicking Refresh on the application keypad or by displaying a new host screen in the browser).

The Refresh will not pick up changes made to the connection (.hco) files. Connection setting changes are not picked up until the application server (or application) is restarted.

The following sections describe each tab of the project editor, and explain how they can be used to modify the project settings.

The Overview tab of the project editor summarizes all of the settings you specified when you created your project. The only item you can modify on this tab is the description of your project.

Each of the section headings on the Overview tab is a link to the other tabs of the project editor.

 

Connections

The Connections tab displays the information about your projects connections. You can select your default host connection from the Default drop-down list.

There is also a list table with showing additional project connections. The list displays the connections name, host, host type, port number and code page. You can add additional project connections by clicking the Add button which launches the Create a Connection wizard. For information on using the wizard see Create a connection.

If you select a bidirectional (bidi) code page, refer to Additions to HATS files.

If you want to edit an existing connection, you need to select the connection and click Edit to launch the connection editor. For more information see Connection editor.

The Remove button will delete the highlighted connection in the list. If you click Refresh, the list will be updated.

 

Template

The Template tab displays the template used to surround a transformation when applying a transformation as the action of a screen customization in your project. On this tab, you can change which template to use as the default template. It will be the default template for your project and will be used for all screens in your application unless you specify a different template for a particular screen.

The default template will be the template applied to all transformations in the project, and the template applied with the default transformation as the default action of an unmatched screen event. For information on how to modify the action of the unmatched screen event, see Application Events.

When creating or modifying the actions of a screen customization, you can override the default template chosen by selecting a different template.

 

Rendering

The Rendering tab displays the settings for default rendering, global rules, text replacement, components, widgets, application keypad and host keypad. This is where you can configure default values for your HATS project.

 

Default rendering

Default rendering is responsible for transforming host screens which have not been individually customized. The default rendering feature attempts to preserve the original host screen structure while extending the functionality of the application by applying web design principles. That is, it does more than render host screen non-protected fields as HTML input fields; it can transform function keys into buttons or links, selection lists into drop-downs, and tabular regions into HTML tables.

The default rendering is configured by creating a prioritized list of rendering items. Each rendering item defines a specific region in which a specified host component is recognized and then rendered using a specified widget. For example, you can look for function keys in the bottom region of the host screen and then render them as links.

The following is a list of the default rendering item list when you create a new HATS project:

You can add a new default rendering item to the list of default rendering items for all screens in this project as well as edit or remove existing rendering items by selecting the item to be edited or removed and select the appropriate button to the right of the table. You can also change the order in which the default rendering items are applied, select an item in the list and click the Up or Down buttons to move it towards the top or bottom of the list.

If you select the Add or Edit buttons you will be asked to enter a description for your rendering item. Next you will need to define the screen region in which your rendering item is applied and then designate the host component to use for recognition and the widget to use for rendering. Please refer to the Insert Host Component wizard or Edit Host Component wizard for more details on the last two panels of the wizard.

This is an ordered list of rendering items. The ordering of the list matters because each rendering item may consume a part of the host screen that another item further down the list may have recognized as well. The higher the rendering item on the list, the higher the priority. The check box next to each rendering item is used to enable or disable the selection.

Components do not always consume the entire region you specify. Suppose you have configured the selection list component to look for selection lists on the entire screen, but only one list was found in the middle of the screen. Only the region in the middle of the host screen will be marked as "consumed". Any remaining "unconsumed" regions of the host screen can still be transformed by lower priority rendering items. The final rendering item in the default list, Transform remaining text and input fields, will transform all remaining "unconsumed" screen regions using the Field component and Field widget. This item should be the last item in a default rendering list.

 

Global rules

Global rules enable application-wide pattern recognition and transformation of host screen input fields. For example, you can create a global rule that renders any input field with the word "Country" before it as a drop-down containing codes for the various worldwide countries. Global rules are truly global to your HATS application; they work in screens both transformed by the new default rendering, and also in custom transformations. This allows you to enable your entire application to recognize a particular host screen pattern without modifying any of your transformations.

A global rule consists of a configured pattern type and a transformation fragment. The pattern type configuration specifies what sort of content to look for on the host screen. For example, the pattern to recognize could be an input field preceded by the word "Date". The transformation fragment contains the content with which we would like to replace all occurrences of the pattern in any given transformation. The transformation fragment could contain a HATS component tag with an input field component and a calendar widget. This will result in all input fields preceded by the word "Date", across the entire application, displaying as a calendar control.

All configured global rules are displayed in the global rules table. Global rules are processed in the order they appear in this list at the beginning of every Apply transformation action. Once an input field is recognized by one global rule in the list, it will not be recognized by a subsequent global rule. The check box next to each item indicates whether the item is enabled or disabled.

Click the Add button to add a global rule definition to the list of global rules for this project. If you do not have a screen capture, you will be prompted to open the host terminal so you can capture a screen. Creating a new global rule involves entering a name, description, and selecting whether to create a new transformation fragment or use an existing fragment. Next, you need to select a pattern type to use. The pattern types to choose from are described below:

Each pattern type component can contain a set of customizable settings as described above. As you change settings, the screen on the left is updated to reflect which input fields would match (note that multiple fields will be highlighted if multiple fields match). To see all available input fields for the selected screen, select the Highlight input fields check box. If you want to see what fields are protected, select the Highlight protected fields check box. If you are using an existing fragment, click Finish to update the global rule set and skip the section below.

If you are creating a new fragment, now configure the HATS component tag to be inserted into the new transformation fragment. The purpose of global rules is to find input fields; therefore, only input components are displayed. The host screen region that is being used for configuration of this page is denoted by the selection box surrounding the first matched input field from the previous page, but remember that the global rule will act on all matched input fields, on this host screen and all others. Select a component and widget, and if desired, configure their settings. Please refer to the Insert Host Component wizard or Edit Host Component wizard for more details on this page. Clicking Finish will update the global rules set and create a new transformation fragment in the Transformation Fragments folder. Make certain to save your project settings after finishing the wizard.

To modify the component and widget settings of an existing global rule, you will need to go to the HATS Project View, the Transformation Fragments folder and edit the associated fragment.

The transformation fragment is initially created with a special HATS component tag which corresponds to the settings chosen on the third page of the global rule wizard. This tag is special because it does not have region attributes. Instead, it dynamically obtains the region used to render this tag at runtime. You can edit this tag as you would any other HATS component tag, but on the first page of the wizard, select a global rule instead of a screen region. You can insert other valid HATS transformation content into this transformation fragment as well.

Global rules are also applied in screen customization's transformations. You can turn off global rule processing at the screen customization level. To disable, click Edit in the Apply a transformation screen customization action and clear the Apply global rules check box.

 

Text replacement

HATS applications can convert text strings on host screens into different strings or HTML on Web pages. These text strings must be protected text strings; that is, strings that are used only on the screen and never passed to the host application as input. For example, you can change the text string used as a field label or prompt, but not the text in an entry field.

Text Replacement displays a table in which you can specify any text you want to replace, the text (or HTML content or image) with which you want to replace the original text, and whether the text search is case-sensitive or not.

Care should be taken when using text replacement. Text replacement with a disparate number of characters in the strings can cause changes in the HTML representation of the screen. Depending on the widget used for presenting a region of a screen, text on a line of the screen could be contracted, expanded, or forced to a new line.

You can add, modify, or remove any text replacement specifications by using the buttons to the right of the table of values.

 

Host Components and widgets

To change settings for individual host components and widgets, expand them in the tree to see the individual host components and widgets. Some of the host components and widgets do not have any customizable settings. For information on the settings that can be customized with the Insert Host Component wizard, see Component and widget settings.

You can override the default project settings for host components and widgets when you insert them into transformations. Those modified settings only apply to the individual instances of those host component or widget in the transformation. All the other instances of the host component or widget for any transformation in the project still use the default project settings, unless you modify them. For example, you have default settings for the VisualTable component. In a single transformation, you can have two VisualTable components; one that uses the default settings from the project settings, and another that uses modified settings.

 

Components

Components displays a list of host components which can be used to convert elements of a host screen to objects that can be displayed on a Web page. The settings for a host component specify how that component is to be recognized on the host screen. Some of these components can be modified. For information on host components, see Host component settings.

 

Widgets

If you select Widgets, you will get a list of all HATS widgets which your project can use to display host components on your Web page. Some of these widgets can be modified. When you customize a widget, you specify how the widget will appear on the Web page. Some of these widgets can be modified. For information on widgets and the settings you can modify, see Widget settings.

 

Application keypad

You can customize the following settings for the application keypad:

Show default application keypad

Select the check box if you want a default application keypad defined in templates or transformations to appear in the HTML output when users interact with your application.

Select keys to display

If the Show default application keypad check box is selected, you can select the check boxes next to each of the keys that you want to include on the default application keypad in the HTML output.

Display as

Select the value from the drop-down list to determine whether the selected keys appear as buttons or links.

 

Host keypad

You can customize the following settings for the host keypad:

Show default host keypad

Select the check box if you want a default host keypad defined in templates or transformations to appear in the HTML output when users interact with your application.

Select keys to display

If the Show default host keypad check box is selected, you can select the check boxes next to each of the keys that you want to include on the default host keypad in the HTML output. If you want to include all the available keys, you can select Select all. You can select Deselect all to clear all of the boxes that are checked.

Display as

Select the value from the drop-down list to determine whether the selected keys appear as buttons or links.

You can also add a custom host key by clicking the Add button and then entering the Caption and Mnemonic. Click Select all when finished.

 

Events

The Events tab displays a list of prioritized screen customization events contained in your project as well as application-level events.

If the check box next to the name of a screen customization is selected, that screen customization is enabled for the project. When a screen customization is enabled, and the screen recognition criteria match the host screen, HATS performs the actions specified for that screen customization, and no more screen customizations are checked for matches. When a screen customization is disabled, HATS ignores the screen customization. If you want to test certain screen customizations, you can disable other screen customizations. To disable customization, clear the check box while you are testing.

HATS applications check each incoming host screen against the list of screen customizations. If there are multiple screen customizations that match a given screen, the first screen customization that matches the screen is applied. The higher priority screen customizations should be near the top of the list. For example, you might have one screen customization that recognizes a few specific screens, and a second one that recognizes a more general set of screens. If the second screen customization is higher in the list than the first, a screen might be recognized by the more general screen recognition criteria and perform the associated actions, rather than recognizing the screen by the more specific criteria and performing the associated actions of the first screen customization.

If you want to change the priority of any of the screen customizations, highlight the screen customization by clicking it. Then click either Up or Down to move the screen customization higher or lower in the list.

For more information, see Screen customization priority.

If you want to edit an application-level event, click Application Events and click the link of the event you want to edit. For more information see Application Events.

 

Other

The Other tab displays the settings for keyboard support, client locale, connection parameter overrides, asynchronous update and global variable overrides.

You can customize the default project settings for each of these by clicking on the node in the customization settings tree.

 

Keyboard support

You can customize the following settings for keyboard support:

Turn keyboard support on

Click the check box if you want your end users to be able to use the physical keyboard keys to interact with the host. This enables the end user to click representations of host aid keys, such as the function, SYSREQ, or ATTN keys. However, if keyboard support is turned on, the end user will not be able to use those same keys for other functions, such as requesting help for the browser by pressing the PF1 key.

Turn initial keyboard state on

Click this check box to make the keyboard enabled when the HTML output is initially displayed to the user.

Show cursor position in status window

Checking this box will display the cursor position in the status window.

 

Client locale

You can customize the following settings for the client locale:

Select where to acquire the language to display button captions and messages

Click one of the following radio buttons:

From the browser's "Accept-Language" header

The language used to display button captions and messages is determined by the language specified by the end users browser.

From the server's primary locale

The language used to display button captions and messages is determined by the locale of the machine where the application is deployed.

Always use the following language

You can select the language to use for button captions and messages from the drop-down list.

 

Connection Parameter Override

You can customize the following settings for the URL parameter override. Click one of the following radio buttons:

Allow ALL default connections parameters to be overridden by CLIENT requests

This button allows you to override all connection parameters except for those listed and checked in the table

Do not allow ANY default connections parameters to be overridden by CLIENT requests

If you click this button, you will not be able to override any connection parameters except for those listed and checked in the table.

You can provide exceptions to the choice you select by adding or removing connection parameters. To get a list of available connection parameters, click the Add button

 

Asynchronous Update

Asynchronous update is performed by an applet which allows the server to push content to the client. It automatically disconnects the client when a browser is closed. This enhances performance by reducing screen settling time and eliminates the need to reload the page for each new transformation.

To enable asynchronous update, select the Enable applet check box. Next you can specify the port and time to wait before disconnecting.

Allow Overrides lets the user override the applet if it has been enabled.

You have the option of making browser specific settings. You can decide to Disconnect, which will end the connection. Refresh reloads the page and Local lets you browse locally.

 

Applet settings

By providing an applet to java-enabled browsers, it is possible for the server to push content to the client whenever it becomes available. The applet provides the ability to automatically disconnect a user when his/her browser is closed. The applet allows newer browsers to change only the presentation space without refreshing the browser page and leave the static content intact.

When you create a new project, a tag will be generated in the file Web Content/WEB-INF/profiles/application.hap within the <classSettings> tag. The following are the default settings:

<class name="com.ibm.hats.common.AppletSettings">
 <setting name="allowOverride" value="false"/>
 <setting name="disconnectDelay" value="10000"/> 
 <setting name="enable" value="true"/> 
 <setting name="ie" value="disconnect|refresh|local"/> 
 <setting name="netscape6+" value="disconnect|refresh|local"/>
 <setting name="nonWindows" value="disconnect|refresh|local"/>
 <setting name="other" value="disconnect|refresh|local"/>
 <setting name="port" value="0"/>
</class> 

A brief explanation of each parameter:

enable

Specify whether the applet should be used in a given application. The default is false. The other possible value is true which turns the applet functionality on or off; the implication of turning it on is that a listening socket will be established on the given port and each browser that connects to your application will have the applet tag inserted in the page.

port

Select the port that the server should use for communicating with applets. 0 specifies a random port above 1024; you can also specify a range of ports (ex. 2043-4544) or a comma-delimited list of ports (ex. 3045,1345,9596). The default value is random.

disconnectDelay

Whenever the browser loads a new page or closes, the applet will wait this amount of time before disconnecting the user from the host; if it is set too low, users may be disconnected when going from one page in the application to the next; there is no real danger in setting it too high, but resources on the server and host will be held for a user who has closed the browser until the time period has passed. The default value 10000 (milliseconds).

allowOverride

Allow individual users or links to decide whether or not to use the applet by adding /entry?useApplet=true/false to the application URL. The other possible value is true which allow the user or a link to override the enabled setting with an address such as the following: http://mycompanysite/myapp/entry?useApplet=true. The default value is false.

The remainder of the settings determine the features to be used in a given browser or environment; the following options may be listed:

disconnect(d)

Automatically disconnect a user from the application when the browser is closed; this works in any java-enabled browser.

refresh(r)

Allow the server to automatically refresh the page when new content becomes available; this should work in any java-enabled browser, but may have undesirable side effects.

local(l)

Refresh only the presentation space of the page; this only works reliably in later versions of Internet Explorer and Netscape 7; it may cause JavaScript errors and browser crashes in other environments.

nonWindows

Specify settings for browsers that run under operating systems other than Windows. The possible options are disconnect, refresh, local. The algorithm looks for l d and r and doesn't care about separators; in order for any options to apply, they must be listed in both the operating system setting and the browser setting; (example: nonWindows=dr netscape6+=lr; a Linux Netscape 7 browser will just use refresh). The default value is disconnect|refresh.

ie

Specify settings for all versions of Internet Explorer. The default value is disconnect|refresh|local

netscape6+

Specify settings for all versions of Netscape 6 or above. This may be superseded by the nonWindows option. The default value is disconnect|refresh.

other

Specify settings for other browsers (i.e. Opera, Mozilla). The default value is disconnect|refresh

The asynchronous update applet does not work with IBM WebSphere Portal. For more information, see HATS in WebSphere Portal.

 

Global Variable Overrides

You can control which HATS global variables, if any, can be overridden (created or changed) by an end-user's client request.

Click one of the following radio buttons:

Allow ALL global variables to be overridden by CLIENT requests

This button allows you to override all global variables except for any listed and checked in the table.

Do not allow ANY global variables to be overridden by CLIENT requests

If you click this button, you will not be able to override any global variables except for those listed and checked in the table.

You can add a global variable exception by clicking the Add button. There you can either type a global variable name in the text box or select it from the drop-down list. Check the Enterprise-wide shared Global Variable check box to indicate a global variable that is shared among HATS applications within the Enterprise application (EAR file).

If you want to edit a table entry, click Edit. The Remove button will delete the highlighted global variable from the list of exceptions.

The default for applications migrated from HATS V4 is to allow all global variables to be overridden by client requests. You can change that here after importing the application. The default for new HATS V5 applications is to disallow any global variables to be overridden by client requests.

 

Source

The Source tab displays the tags and values in the application.hap file for all the settings you selected or defaulted to in your project. As you make changes on other tabs in the project editor, the tags and values displayed under the Source tab change to match.

You can also make changes to the tags and values to the file directly by editing the source under the Source tab, and they will be reflected on the appropriate tabs of the project editor.

 

Use HATS preferences

Use HATS preferences to control the appearance and behavior of HATS Studio. Some preferences are designed to control the appearance of the HATS Project View. Other preferences make HATS Studio more accessible or simplify programming tasks. To work with HATS preferences, click Windows > Preferences and select HATS in the tree view. For quick help on any preference, place your cursor on it and press F1.

You can modify these preferences:

Hide file extensions for known file types

By default, the HATS Project View does not display common file extensions such as .jsp. For example, all the files in the Templates folder have the .jsp extension. Clear this check box if you want the HATS Project View to display all file extensions.

Show HATS tips

HATS tips provide helpful suggestions for new users. If you do not want to see HATS tips as you use HATS Studio, clear this check box.

Show Migration Warning

You can decide whether or not HATS should display a migration warning when it finds projects which have yet to be migrated to HATS V5 projects.

Selection filters

This list of check boxes enables you to choose which types of files you want displayed in the HATS Project View. For example, if you never work with common images or stylesheets, you can clear that check box so that they will not appear in the HATS Project View. If you have novice users and you do not want them to work with macros or Java source files, you can clear those check boxes so that those files will not be displayed.

Host terminal fixed font size

This preference is designed for users with impaired vision. You can specify that the size of the text on the host terminal should not change when the window is expanded or contracted. For example, if you require large type, you can set a large fixed font size and use the scroll bars to view different parts of the host terminal screen.

Screen capture highlighting

Colors are used to identify input fields, protected fields, and screen regions that match patterns. Use these preferences to change the colors that are used for these purposes.

There are more preferences, which govern behaviors related to generating Integration Objects. To use these preferences, expand HATS in the preferences tree and click Integration Object. This page contains these preferences:

Automatically generate Integration Object when saving macro

Click this check box if you want an Integration Object to be generated each time you save a macro. Clear the check box if you prefer to create Integration Objects manually.

Templates to be used for Integration Object generation

This is a particularly advanced preference. If you create new Integration Object templates, as described in HATS Programmer's Guide, use these preferences to choose the templates to be used when you create Integration Objects.

When you modify your HATS preferences, you can click Apply to see the results immediately in HATS Studio. Click OK to save your new preferences and close the Preferences window, or Cancel to exit without saving. If you click Cancel, only those changes you have made since you clicked Apply are cancelled.

You can return your HATS preferences to their initial values by clicking Restore defaults.

If you configure your HATS preferences on one HATS Studio, and you want to copy them to other machines, you can click Export to save your preferences as an .epf file. Transfer the file to each machine where you want to use it, or make it available over your network. Click Import to select the file to import.

 

Home