Modifying a HATS project
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. 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 applied when the application server (or application) is restarted.
Note:Setting used for the entire HATS projects should not be confused with settings applied throughout HATS. HATS-wide settings can be applied from Window > Preferences > HATSThe following sections describe each tab of the project editor, and explain how they can be used to modify the project settings.
Overview
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 displaying all of your 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. HATS allows you to specify more then one connection which can be used for your project. For information on using the wizard see Creating a connection.
Note: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. If you click Refresh, the list will be updated.
Template
The Template tab displays the template used to surround a transformation.
On this tab, you can change which template to use as the default template. It will be used for all screens in your application unless you specify a different template for a particular screen using an action in a screen customization.
The default template is also 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. You can also edit the template while you are on the Template tab.
You can create your own templates to use for your HATS projects. For more information, see Creating your own templates.
Rendering
The Rendering tab displays the settings for rendering sets, global rules, text replacement, components, widgets, application keypad and host keypad. This is where you can configure default values for your HATS project.
Rendering Sets
Rendering sets are responsible for transforming host screens that have not been individually customized . The selected default rendering set 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 rendering set 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.
You can create more than one rendering set for your default transformation. If you create additional rendering sets, only one will be used in the default transformation. To create a new set, click the Add button to open the Add Rendering Set window. Specify a unique Name and Description (optional) for your new rendering set.
If you want the new rendering set as the default, check the Use this rendering set for default rendering check box.
A rendering set can either be blank (no rendering items defined) by selecting the Create empty rendering set button or you can choose a set from the Copy new rendering set from existing set pull-down menu. Rendering sets can also be modified or deleted by selecting the Edit or Remove buttons beside your list.
The following is a list of the rendering items to choose from when you create or edit your rendering sets:
- Transform dialogs
- Transform ENPTUI windows as dialog
- Transform subfiles
- Transform ENPTUI menu bars as links
- Transform ENPTUI actions as links
- Transform ENPTUI single selections as radio buttons
- Transform ENPTUI multiple selections as check boxes
- Transform ENPTUI scrollbars
- Transform selection lists as links
- Transform function keys as links
- Transform field tables
- Transform visual tables
- Transform URLs as links
- Transform remaining text and input fields
Note:ENPTUI rendering items will not appear if you are using a 3270 host. ENPTUI support must be enabled during the initial creation of your HATS 5250 project.You can add a new rendering item to the selected rendering set 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.
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. You can also change the order in which the 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. Please refer to the Insert Host Component wizard or Edit Host Component wizard for more details on the last two panels of the wizard.
Note:The dialog component is a special component used in rendering to recognize modal frames (popups) on the host screen and render them. However, you can not use the dialog component to insert modal frame host components into individual transformations.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 rendering set.
Multiple rendering set example
Suppose you want to create one HATS application, and from that application, allow users to access more than one host application. Let's say you have two applications, and they look and feel very different from one another. You've decided you would like different rendering sets for each, but want to use the power of HATS default rendering and have as few specific screen customizations as possible.
Call one application APPA and the other application APPB:
- Create a rendering set specifically tailored to APPA
- Create a rendering set specifically tailored to APPB
- Create a transformation "APPA" that has a default rendering tag with a parameter for the APPA rendering set
- Create a transformation "APPB" that has a default rendering tag with a parameter for the APPB rendering set
- Create a screen customization that recognizes only the first screen of APPA and call it APPAfirst, with actions:
- set global variable "WhichApp" to "APPA"
- apply transformation APPA
- Create a screen customization that recognizes only the first screen of APPB, call it APPBfirst, with actions:
- set global variable "WhichApp" to "APPB"
- apply transformation APPB
- Create a screen customization called APPArest, that recognizes true if global variable "WhichApp" equals "APPA", with action: apply transformation APPA
- Create a screen customization called APPBrest, that recognizes true if global variable "WhichApp" equals "APPB", with action: apply transformation APPB
- Order the screen customizations in your project settings Events tab like so: APPAfirst, APPBfirst, APPArest, APPBrest
How to make default rendering customizations available in new HATS projects
If you want your default rendering customizations to appear the next time you create a new HATS project,...
- Create a project and customize your default rendering options.
- Open the application.hap file for this project, located in:
<workspace_directory>\project name\Web Content\WEB-INF\profiles\- Copy the source between the <defaultRendering> and </defaultRendering> in the application.hap file and replace the source between the <defaultRendering> and </defaultRendering> in the application.hap file located in:
<HATS__install_directory>\eclipse\plugins\com.ibm.hats\predefined\ projects\new\Web Content\WEB-INF\profiles\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 rendering set, 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. It lets you transform specific or all fields of a certain size, or those nearest to a string you specify. 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 associating it with a Create a new transformation fragment. If you are editing a global rule, you can Use an existing transformation fragment.
Next, you need to select a pattern type to use. The pattern types to choose from are described below:
- The Find input fields by surrounding text pattern type recognizes any input field which has a designated string bordering it on the left, right, top, or bottom. This pattern type requires you to select specific Pattern Settings. The designated string can contain one or more asterisks (*) used as wildcards. Spaces are significant. You can either Transform only the nearest input field or all input fields. Specify in the Located drop-down list where the text pattern must be in relation to the input field for the global rule to be applied. Insert the text for which you want this global rule applied in A protected field containing field. If the Case sensitive box is used, it will search for the exact text specified. This pattern type is used by the "Country" and "Date" examples above.
- The Find all input fields pattern type successfully recognizes all host screen input fields. This pattern type has no pattern settings. A global rule using this pattern type should be placed at the bottom of the global rule list so it takes the lowest priority.
- The Find input fields by field size pattern type recognizes any input field which has a designated length. For example, this can be useful for transforming input fields of length one into check box controls.
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). You can also highlight certain fields on your host screen by selecting the different options beside Highlight fields. If you want to see where the input fields are defined on the screen, select the Input check box. If you want to see what fields are protected, select the Protected check box. If you want to highlight any hidden fields, select the Hidden check box. To modify the colors of the input, protected or hidden fields highlighting, see Using HATS preferences. 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 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.
Note:If you need to modify the component and widget settings of an existing global rule, you can go to the Rendering tab, select Global Rules and check the transformation fragment from the list then click Edit.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.
Note:When you create a global rule, and then edit the transformation fragment, you are not able to see the output on either the design or preview tabs. To view the output, use the full page preview from the Edit Host Component function while editing either a transformation fragment or a full transformation that makes use of the global rule.If you do elect to manually modify the transformation fragment associated with a global rule, it should not be done after using the editor from the Rendering tab. Doing so results in the wrong tag being read and the removal of any modifications made.
Global rules are also applied in screen customization's transformations. You can turn off global rule processing at the screen customization level. To disable:
- Go the Screen Customizations folder in the HATS Project view
- Double click the screen customization
- Click the Actions tab.
- Select the Apply a transformation screen customization action.
- Click Edit.
- 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.
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. You can add, modify, or remove any text replacement specifications by using the buttons to the right of the table of values. For information on how to modify these settings, see Text Replacement.
Components and widgets
To change settings for individual components and widgets, you must expand them in the tree to see the individual components and widgets. Some of the 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 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 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. For information on widgets and the settings you can modify, see Widget settings.
Application keypad
The default application keypad is displayed in the default template. 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
The default host keypad is displayed in the default transformation.
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.
DBCS
You can configure DBCS options for your project if your default connection specifies a DBCS code page.
- Show unprotected Shift In/Shift Out characters as spaces
- Checking this box will allow you to display unprotected Shift In and Shift Out characters as spaces for the field, subfile and table widgets
- Automatically convert SBCS characters to DBCS for G-type and J-type fields
- Check this box if you want to automatically convert single byte characters to double byte characters for 3270 and 3270E G-type or 5250 G-type and J-type fields.
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 enabled 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.
Note:If you have a screen customization that specifies an identified next screen, the identified screens will take priority. For more information, see Next Screen.If you want to edit an application-level event, click the link of the event below Application Events that you want to edit. For more information see Application Events.
Other
The Other tab displays the settings for keyboard support, client locale, operator information area, 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 press certain physical keys that have been mapped to host aid keys, such as the F1, SYSREQ, RESET, or ATTN keys. The end user can toggle this feature off if they wish to use a mapped physical keyboard key to interact with the browser instead.
To use keyboard support in HATS projects, have a supported Web browser. For a list supported Web browsers and limitations, refer to HATS Getting Started.
- Turn initial keyboard state on
- Click this check box to make the keyboard enabled when the HTML output is initially displayed to the user.
Select from the following options to choose if keyboard support will be limited to function keys displayed on the browser page:
- Support only host functions displayed on host keypad
- Selecting this option will scan the browser page for recognized function buttons or links. If any functions are found, only those are supported. If none are found, all functions are supported. This was the default behavior in previous versions of HATS, and applications migrated from previous versions will continue to function as they did previously.
- Support all mapped host functions
- Select this option to have keyboard support work with all mapped functions, regardless of which host key buttons or links may exist on the browser page. This is the default behavior for new HATS applications.
Client locale
Button captions and messages can be displayed in different languages. To acquire the language to display, customize the following client locale settings:
- 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 user's 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.
Operator Information Area
Operator Information Area (OIA) allows you to easily determine the state of the host application. You can customize the following settings for the OIA:
- Turn OIA support on
- Checking this box will make the OIA visible. Checking any of the following check boxes allows you to specify what to display:
- Secure host connection
- Check this box if you want to display whether the HATS connection is SSL secured
- Input inhibited indicator
- Check this box if you want to display whether the keyboard is locked, preventing input from the keyboard.
- System locked indicator
- Check this box if you want to display whether the system is locked while waiting for data to be returned. Refreshing the screen can clear the lock.
- If asynchronous update is active
- Check this box if you want to display whether the asynchronous update applet is enabled.
- Input mode
- Check this box if you want to display whether overwrite mode is enabled (if supported by the browser).
- Absolute cursor position
- Check this box to display the host cursor position.
- Cursor row and column
- Check this box if you want to display the host cursor row and column position.
- If auto-advance is active
- Check this box if you want to display whether auto-advance is enabled (if supported by the browser).
- Field data
- Check this box if you want to display external field data, such as numeric only or field exit required.
- Bidirectional indicators
- Check this box if you want to display the current bidirectional controls (if supported by the browser).
- Display area layout
- Horizontal
- Check this button if you want to display the OIA horizontally (across the bottom of the page).
- Vertical
- Check this button of you want to display the OIA vertically (as a side frame on the page).
- Style class
- Enter a cascading style sheet (CSS) class name that controls the appearance of the OIA.
Connection Parameter Override
You can customize the following settings for the connection 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.
Note:When you send a connection parameter override on a browser request to a HATS application, a basic connection, which is not intended to be a clone of the default connection for the project, is used. The difference between the default connection for the project and this basic connection is that on the basic connection, pooling is always disabled, connect and disconnect time-outs and the connect and disconnect macros are ignored. The other connection settings (host name, port, SSL enabled, and so forth) are copied from the project's default connection definition (typically main.hco).If macro functionality is needed when a connection parameter override is first established, you should configure a screen customization to recognize the first screen and run a macro as the screen customization action.
The disconnectOnClose parameter
HATS provides the asynchronous update applet to automatically disconnect the host if the browser is closed before the session disconnects. For applications not using the asynchronous update applet, the disconnectOnClose parameter performs a similar function. It enables the HATS server to reset the host Telnet session immediately if the browser is closed before the session is manually disconnected from the host by the user. Disconnection normally occurs when the user clicks Disconnect. Resetting the Telnet session is accomplished by having a hidden frame in the browser that launches a new browser when the original browser is closed. The new browser window sends a disconnect signal and then closes itself. The functionality is only enabled when you specify disconnectOnClose=true and you are using Internet Explorer V5.5 or V6.0. A sample URL request follows:
http://hostname/appname/index.jsp?disconnectOnClose=truewhere appname is the name of your HATS application.
The following conditions are true when using the disconnectOnClose parameter:
- The disconnectOnClose parameter works if all navigation is done through the HATS session frame (including clicking on links within the page).
- The disconnectOnClose parameter does not work if the user browses away using the address bar or a 'Favorites' entry. If the user browses away by these means, and does not navigate back to the HATS application before closing the browser, the automatic disconnect does not occur.
- The disconnectOnClose parameter does not work if frame support is disabled or if pop-up prevention software is installed.
- The disconnectOnClose parameter does not work in a Portal environment because of its use of HTML frames.
Asynchronous Update
Asynchronous update is performed by an applet running on the client. There are two functions performed by the asynchronous update feature :
- Pushing asynchronous host updates to the browser:
- This enables the user to see host updates automatically without the user pressing the "Refresh" button
- Notification of browser close to HATS server:
- This allows the HATS server to clean up resources associated with the browser session and reduces the load on the server
In order to run the applet, a Java-enabled browser is needed. To enable asynchronous update, select the Enable applet check box.
The following settings are needed:
- Host name
- This is the host name or IP address of the server where the HATS application will run. If the server is in a horizontally clustered environment, the host name should be changed by editing the application.hap file after the applications file is deployed to the server.
The browser-side applet uses a TCP/IP socket to communicate with the HATS server. The host name of the machine hosting the HATS server is needed to create the socket. If HATS is deployed on the same Web server machine specified by the browser's URL, then the host name parameter doesn't need be specified and the applet will use the Web server machine's IP address to establish the socket connection. If the HATS server is on a different machine, the host name parameter would need to be specified with either a internet host name visible to the browser or an IP address.
- Port for server socket
- The port that the server should use to communicate with the applet. A zero (0) specifies that a random unused port above 1024 is used. You can also specify a range of ports, such as 2043-4544, or a list of ports delimited by commas (,), such as 3045, 1345, 9596.
Note:If HATS is "Vertically clustered" (multiple HATS deployments on the same physical machine) separate ports need to be specified for each of the clones. This could be done by either editing the port on each of the clones or by specifying multiple ports (using comma separated ports or a range of ports) on the original HATS application. The clones will then use separate ports from the specified set.- Time to wait for disconnect
- The time, in minutes, that the application waits to disconnect the user after the browser is closed. This can occur if you are away from the browser for some time and you want to ensure the application disconnects. The default is 5 minutes. Valid values are numbers greater than or equal to 5 minutes.
Additional browser specific settings as well as non-Windows mask settings can be specified for the applet. These settings can to be changed by editing the application.hap file. For more information on these additional settings, see Applet settings below.
Note:Applet settings
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="hostname" value=""/> <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, causing a listening socket to be established on the given port. Each browser that connects to your application will have the applet tag inserted in the page.
- hostname
- The hostname or the IP address of the HATS server needs to be configured in the application.hap file so that the applet can connect back to the HATS server.
- 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 is 5 (minutes).
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 allowing the host-side connection from the HATS server to the host to be cleaned up. 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.
- local(l)
- Refresh only the presentation space of the page; this only works reliably in later versions of Internet Explorer 6 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). 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
There are certain rules which can apply to the host name and port parameters in the application.hap file:
- If HATS is behind a firewall, zero "0" should not be used as it can be difficult to let arbitrary ports go through the firewall.
- For vertical clustering, if HATS is behind a firewall, a port range could be specified. If HATS is on the web server, zero "0" or a range could be specified instead of a port number. In both cases, it is highly recommended that port numbers are specified individually on the web servers.
- For horizontal clustering, the host name should be changed by editing the application.hap file. Hand editing the .hap file needs to occur after the .ear has been deployed via the WebSphere Application Server Admin (on the server).
Note:The asynchronous update applet does not work with IBM WebSphere Portal. For more information, see WebSphere Portal and HATS.Global Variable Overrides
You can use this feature to pass data from the end user's browser into the application. For example, you could allow the end user to supply a user ID and password, and use them to run a macro.
To override a local variable, you add an HTML parameter hatsgv_varName=newValue to the client's HTTP request. To override a shared variable, the parameter name is hatssharedgv_varName.
To allow the end user to create and set the value of a shared global variable named User ID, you could supply an input field by adding the following to the body of the <HATS:Form> tag of a transformation JSP:
<INPUT name="hatssharedgv_UserID" type="TEXT" size="10">Any value supplied by the end user would be the new value of the shared variable User ID. If you were creating the value by JavaScript, instead, and did not want the end user to be able to enter the new value, you could use a hidden input field and supply the value yourself:
<INPUT name="hatssharedgv_UserID" size="10" type="HIDDEN" value="alice">To create a new global variable or change the global variable's value in the URL, something like the following could be used in a GET request:
http://hostname/appname/entry?hatsgv_UserID=bobTo control which HATS global variables, if any, can be 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.
Note: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 and V6 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.
Using HATS preferences
You can use HATS preferences to control the appearance and behavior of HATS Studio. These 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 V6 projects.
- Show Display Terminal dialog
- You can decide whether or not HATS should display a dialog asking you if you want to turn on the display terminal when you Run On Server. This can also be turned off by checking the check box on the dialog when it pops up.
- Show extract hidden fields warning
- You can decide whether or not HATS should display a dialog warning you when it encounters a hidden field on a captured screen. This can occur when:
- extracting data during the recording of a macro using a live terminal.
- creating screen customization criteria using a captured screen.
- adding a new "Extract global variable action" using a captured screen.
- 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 style sheets, 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 Preferences
- Prompt for all macro prompts before debugging a macro
- If checked, a dialog will appear when you first debug your macro, and will allow you to enter values for all prompts at once. If unchecked, you will be prompted with a dialog that requests only the value for the current prompt that your macro is stepping through. You will have to enter a value for every prompt, one-by-one. This preference is only used when debugging a macro, it has no effect when playing your macro in HATS Studio or when running of your macro or HATS application.
- 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
- Colors are used to identify input fields, protected fields, hidden 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 other behaviors related to HATS To use these preferences, expand HATS in the preferences tree and click one the three sub categories:
- BMS Import
- These settings are only used when BMS source files are added to the Maps folder within the HATS project without using the BMS Import wizard.
- Host code page
- The code page used for the BMS maps being imported
- BMS file code page
- The code page used for the BMS file when it was transferred to the workstation.
- Integration Object
- 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. See Using Integration Objects for information about creating Integration Objects from macros.
- Automatically generate EJB Access Bean in HATS EJB Project when an Integration Object is created
- Click this check box if you want an EJB Access Bean to be generated in your HATS EJB Project whenever you create an Integration Object. If you have checked the Automatically generate Integration Object when saving macro preference, an EJB Access Bean will be created along with the Integration Object when you create or modify a macro.
- 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 Object file.
- Templates to be used for Integration Object BeanInfo 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 defining an Integration Object BeanInfo file.
- Transformation
- These preferences get applied when you create a blank transformation can also be selected.
- Include a Free Layout Table
- When you create a blank transformation, the default height and width of the table is retrieved from this setting. By default, this setting is initialized to 100% unless you specify something different. You can also specify measurements in pixels by selecting Pixels from the drop-down menu.
Note:If a host component is inserted after the table in the transformation, the rendered component will not be displayed when run on server because the table uses 100% of the screenWhen 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. Both buttons can be found on the bottom left of the Preferences window.