When you create a project using the HATS Create a Project wizard, the settings you choose in the wizard are saved in a project application (.hap) file. You can invoke the project editor by double-clicking on Project Settings under the name of the project you want to modify in the HATS Projects view.
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 running your project in a test environment by clicking Refresh on the application keypad or by displaying a new host screen in the GUI. 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.
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 General Information section contains the project name and description, the chosen template and theme, and the date last modified.
Click the link for the current theme to change the project theme. Four options are provided, Standard, Modern Web application Web-only or Modern UI application RCP-only , Classic terminal emulator, and Custom. Each function in the list of settings can be enabled elsewhere in the project settings. This list provides a convenient method of setting the functions in one place that together can be treated as a theme for the appearance and behavior of your application.
The following table shows how each theme setting maps to an individual project setting.
Theme Setting | Project Editor Tab | Project Setting |
---|---|---|
Arrow key navigation RCP-only | Other | Client settings > Enable arrow key navigation |
Automatic field advance | Other | Client settings > Enable automatic field advance |
Cursor positioning on protected fields | Rendering | Widgets > Field > Allow cursor positioning on protected fields |
Field extended attributes | Rendering | Widgets > Field > Enable extended attributes |
Host keypad | Rendering | Host keypad > Show default host keypad |
Keyboard support | Other | Keyboard support > Enable keyboard support |
Operator information area | Rendering | Operator information area > Show OIA |
Overwrite mode (initial) | Other | Client settings > Overwrite mode (initial) |
Rendering using monospaced font | Rendering | Widgets > Field > Render using monospace font |
The Standard theme enables the functions that are enabled by default when a HATS project is first created. Selecting the Modern theme deselects all of the individual functions. Selecting the Classic theme selects all of the functions. Selecting the Custom theme allows you to select any other combination of functions.
The Testing section contains links that can be used to test your project. For HATS Web projects the links are:
For HATS rich client projects the links are:
The Deployment RCP-only section includes a Target platform drop-down. Use this drop-down to change the target deployment for your rich client project. This allows you to start building an application targeted for one platform and switch to a different platform at a later time. Supported platforms are Eclipse Rich Client Platform, Lotus® Expeditor Client for Desktop, and Lotus Notes.
If you change the target platform here, and it does not match the target platform of the workspace, a message is displayed informing you of this. The action to take in this case depends on which platform you have changed to for this project.
If you changed to a Lotus Notes® or a Lotus Expeditor Client platform, see Configuring the target platform for information about setting the target platform.
If you changed to the Eclipse Rich Client Platform, select Window > Preferences > Plugin-in Development > Target Platform and select your Rational® SDP installation directory (the default is C:\Program Files\IBM\SDP) from the Location drop-down list.
When prompted to reload the target platform, select Yes.
Also in the Deployment section is a link, open the plug-in manifest, that launches the editor for the plug-in descriptor (plugin.xml) of the project. Advanced rich client development will require modifications to this file.
The Connections, Rendering Settings, and Other Settings sections summarize the settings specified on each of their corresponding tabs. The headings themselves are links to their corresponding tabs which are described in sections that follow.
The Connections tab displays the information about your project's connections. There are two types of connections in HATS, default (also referred to as transformation) and background. Each HATS application has one default connection for the host application whose screens HATS will transform. Background connections are any connections in a project other than the default connection. HATS does not transform screens from background connections. For more information, see Managing 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 connection 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 than one connection which can be used for your project. For information about using the wizard see Creating a connection.
To edit an existing connection, 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.
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 about 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 Create a Template wizard.
The Rendering tab displays the settings for default rendering, global rules, text replacement, components, widgets, toolbar RCP-only , application keypad, host keypad and operator information area. This is where you can configure project-level default values for your HATS project.
Default rendering is responsible for transforming host screens that have not been individually transformed. The selected default rendering set attempts to preserve the original host screen structure while extending the functionality of the application by applying GUI design principles. That is, it does more than render host screen non-protected fields as GUI input fields; it can transform function keys into buttons or links, selection lists into drop-downs, and tabular regions into tables.
A 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 Sets window. Specify a unique Name and Description (optional) for your new rendering set.
If you want the new rendering set as the default, select 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 select 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 list of rendering items are defined as part of the default rendering set:
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, enter a name and description for your rendering item. Next, 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. Refer to the Insert Host Component or Edit Host Component Web-only for more details on the last two panels of the wizard.
The list of rendering items that make up the rendering set is an ordered list. 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.
Care should be taken when using the Table component in a default rendering set because the Table component will recognize almost every screen in the selected region, and no rendering items lower in the list will be recognized.
The final rendering item in the default list, 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.
In general, the default rendering set attempts to preserve the original host screen structure while extending the functionality of the application by applying GUI design principles. However, to allow default rendering of host screens to be displayed on mobile devices, a certain amount of compacting may be necessary. With compacting, the amount of HTML and blank space is reduced which may possibly display a different structure of the original host screen. To specify that the currently selected rendering set use compacting, select Use compact rendering Web-only .
Suppose you want to create one HATS application, and from that application, allow users to access two host applications that look very different from one another. You have decided you want 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:
To change advanced rendering settings, expand the default rendering tree and click Advanced.
In this section you can specify that default rendering should be used if nothing is recognized to render during transformation of a HATS component. This function is particularly useful when an application contains screens that have fields which may switch between unprotected and protected states. For example, if this function is not used and an input field component is being used to recognize the region, nothing will be recognized and rendered if the field switches to a protected attribute state.
In this section you can select an option to create better-formed HTML in default rendering.
This option is not selected by default in order to reduce the amount of HTML included in default rendering. Reducing the amount of HTML is desirable for performance sensitive applications. However, selecting this option may be required for other applications, for example, screen reader applications used for accessibility.
If you want your default rendering customizations to appear the next time you create a new HATS project, follow these steps:
For Web projects, the complete file path is:
<shared_install_directory>\plugins\com.ibm.hats_nnn\predefined\
projects\new\Web Content\WEB-INF\profiles\application.hap
For rich client projects, the complete file path is:
<shared_install_directory>\plugins\com.ibm.hats_nnn\predefined\
projects\rcp\new\profiles\application.hap
In
the file paths above, shared_install_directory is
the shared resources directory where you installed
the HATS offering using IBM® Installation
Manager, and nnn is the version and build
level of HATS.
Global rules enable pattern recognition and transformation of host input fields and work with customized and non-customized (default rendered) screens. They can be defined at both the project level and at the screen level. Use this section to specify project-level global rules. See Global Rules for where to define screen-level global rules.
If a project-level and a screen-level global rule are both defined for the same input field, the screen-level rule has priority.
As an 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. Project-level 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 fields or all fields of a certain size, or those nearest to a string you specify. For example, the pattern to recognize might be an input field preceded by the word Date. The transformation fragment contains the content to use to replace all occurrences of the pattern in all transformations. The transformation fragment might contain a HATS input field component and a calendar widget. This would 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 to capture a screen. Creating a new global rule involves entering a Name, Package (for rich client projects), and 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, select a pattern type to use. The pattern types to select from are as follows:
When you select All input fields for the Transform option, the first input field that matches the criteria determines the scope of the search region for subsequent fields. The example below shows the fields that are considered matches for all input fields below a protected field containing the string Enter.. The Global Rule Settings wizard highlights all of the matching fields. The first match is the field with the caption Alpha field (blue). The start and end columns of this field determine which fields below it are also considered matches. Notice the fields with captions Numeric field (green) and Column separators are not considered matches because they are either longer or shorter than the first matching field. The field with the caption Date field (pink), and the three fields immediately below it, are considered matches because they have the same start and end columns as the first matching field.
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, you must now configure the HATS component 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 a project-level global rule will act on all matched input fields, on this host screen and all others. Select a component and widget, and configure their settings. Refer to the Insert Host Component or Edit Host Component Web-only for more details. 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.
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 select the transformation fragment from the list then click Edit.
The transformation fragment is initially created with a special HATS component which corresponds to the settings chosen on the third page of the global rule wizard. This component is special because it does not have region attributes. Instead, it dynamically obtains the region to render at runtime. You can edit this component as you would any other HATS component, but on the first page of the wizard, you must select a global rule instead of a screen region. You can insert other valid HATS transformation content into this transformation fragment as well.
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 this results in the wrong tag being read and the removal of any modifications made.
Project-level and applicable screen-level global rules are both applied in a screen event transformation. You can disable all global rule processing at the screen event level. To disable:
HATS applications can convert text strings on host screens into different text strings, HTML content Web-only , or images.
Text Replacement displays a table that shows the original text you want to replace, together with the text, HTML content Web-only , or image to use as the replacement. Also shown is whether the text search is case-sensitive and whether regular expression support is being used. You can add, modify, or remove any text replacement specifications by using the buttons to the right of the table of values. For information about how to specify these settings, see Text Replacement.
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 about 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 components or widgets 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 displays a list of host components which can be used to convert elements of a host screen to objects that can be displayed in a GUI. 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 about host components, see Host component settings.
If you select Widgets, you will get a list of all HATS widgets which your project can use to display host components in your GUI. 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 about widgets and the settings you can modify, see Widget settings.
The Toolbar settings panel enables you to change settings related to the toolbar in the Transformation view of your rich client application. The toolbar contains application keypad actions, such as Refresh and Default, as well as actions contributed by the Toolbar widget. For more information about the Toolbar widget see Toolbar RCP-only .
In HATS Web applications, the application keypad is normally placed at the bottom of or in the side bar of the template. For HATS rich client applications, the functions provided by the application keypad exist as buttons on the Transformation view toolbar. This helps the HATS rich client application fit in with other applications in the rich client environment. See Toolbar for more information about the Transformation view toolbar.
On this panel you can select or clear the Show toolbar check box. If you select it, you can set how the toolbar items are displayed, as Text, Image, or Both text and image. This setting applies to all items on the toolbar (including those contributed by the Toolbar widget).
The default application keypad is displayed in the default template. You can customize the following settings for the application keypad:
You can customize the following settings for the host keypad:
You can also add a custom host key by clicking the Add button and then entering the Caption and Mnemonic. Click OK when finished.
Operator information area (OIA) allows you to easily determine the state of the host application. You can customize the following settings for the OIA:
You can configure DBCS options for your project if your default connection specifies a DBCS code page. For more information about DBCS settings on the Rendering tab see Rendering tab.
The Events tab displays a list of prioritized screen events (screen customizations and screen combinations) contained in your project as well as application events.
If the check box next to the name of a screen event is selected, that event is enabled for the project. When a screen event is enabled, and the screen recognition criteria match the host screen, HATS performs the actions specified for that event, and no more screen events are checked for matches. When a screen event is disabled, HATS ignores the event. If you want to test certain screen events, you can disable other screen events. To disable a screen event, clear the check box while you are testing.
HATS applications check each incoming host screen against the list of enabled screen events. If there are multiple screen events that match a given screen, the first screen event that matches the screen is applied. The higher priority screen events should be near the top of the list. For example, you might have one screen event that recognizes a few specific screens, and a second one that recognizes a more general set of screens. If the second screen event 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 event.
If you want to change the priority of any of the screen events, highlight the event by clicking it. Then click either Up or Down to move the event higher or lower in the list. For more information, see Screen event priority.
If you want to edit an application event, click the link of the event below Application Events that you want to edit. For more information see Application events.
You can modify the order of the screen events using the Events tab of the project editor. See Events for more information.
When a HATS application is running and a new host screen is encountered, HATS checks the first enabled screen event in the event priority list to determine if the screen recognition criteria match the host screen. If so, no more screen events are checked for matches, and the actions for the first screen event are performed. If not, the next screen event in the list is checked to determine whether the screen recognition criteria match the host screen. This continues until the last screen event in the list is checked.
If there are no screen recognition criteria in the screen events that match the current host screen, HATS processes the Blank screen event if it has actions and the screen is blank. Otherwise, HATS processes the unmatched screen event. The HATS unmatched screen event is a special screen event that occurs only when no defined screen events match the host screen. The default action of this event is to display the host screen (default transformation) that applies the default template.
You can modify the actions to be taken if a host screen does not match any of your screen events. For example, you can create a Web page that tells the user that the page was not found and gathers information about how the user reached that screen. You can use the Show URL action to present the Web page.
If you want to modify the action of the unmatched screen event, go to the Events tab and click Unmatched screen under the Application Events section to open its editor. Click the Actions tab at the bottom of the editor to display the actions. Click Add, Edit, or Remove to customize the unmatchedScreen.evnt file.
The rules-based approach used by HATS enables you to customize screens by applying certain actions upon a screen recognition event. You can also associate actions with other HATS events, known as application events. Application events include application occurrences such as connecting and disconnecting from the host server, starting or stopping your HATS application, or when your application encounters an error or an unrecognized host screen. You can configure these application events to perform certain actions when they occur.
To access the application events, go to the HATS Projects view and double click the Project Settings of your HATS project and select the Events tab. On the Events tab in the Application Events section, click the link for an event to open its editor.
Each application event has various actions associated with it.
The following list provides descriptions of the HATS application events and when they might occur along with their associated actions
You can specify the following actions for the start event:
You can specify the following actions for the connect event:
You can specify the following actions for the blank screen event:
There are also special settings you can use to specify how to handle a blank screen received when initially connecting to the host. For more information, see Screen Handling.
You can specify the following actions for the unmatched screen event:
You can specify the following actions for the error event:
You can specify the following actions for the disconnect event:
You can specify the following actions for the stop event:
<?xml version="1.0" encoding="UTF-8"?>
<event description="" type="stop">
<actions>
<release enabled="true"/>
<show enabled="true" page="stop.jsp" url="/stop.jsp"/>
</actions>
</event>
The Other tab displays the settings for keyboard support, client locale, connection parameter overrides, asynchronous update, global variable overrides, and client settings.
You can customize the default project settings for each of these by clicking on the node in the customization settings tree.
You can customize the following settings for keyboard support:
To use keyboard support in HATS Web projects, you must have a supported Web browser. For the list of supported Web browsers and limitations, see "System Requirements for Host Access Transformation Services" at http://www.ibm.com/support/docview.wss?uid=swg27011794 and "Host Access Transformation Services 9.5 - Known issues and workarounds" at http://www.ibm.com/support/docview.wss?uid=swg27046998.
Select from the following options to specify if keyboard support will be limited to function keys displayed on the browser page:
Button captions and messages can be displayed in different languages. To acquire the language to display, customize the following client locale settings:
HATS allows Host On-Demand session parameters to be used as connection parameters for HATS host connections. For more information about these parameters see the Host On-Demand Knowledge Center at http://publib.boulder.ibm.com/infocenter/hodhelp/v11r0/index.jsp and search on session parameters. Information about these parameters is also available in the document at http://www-01.ibm.com/support/docview.wss?uid=swg21251884.
For HATS Web applications, these connection parameters can be overridden on the URL used to access the HATS application. For example, a URL like the following can be entered:
http://servername:port/appname/index.jsp?host=9.42.141.26&sessionType=1&port=523&
LUName=LU00001&TNEnhanced=true
After the server name, port, and HATS application name, you specify the welcome page index.jsp, followed by a question mark (?) and then the name=value pairs for the parameters, separated by ampersands (&). The values are the text values defined by Host On-Demand, not the values that are used elsewhere in the application.hap file. For example, sessionType=1 for 3270, and sessionType=2 for 5250.
In addition to the Host On-Demand session parameters, the SSLP12FilePath and SSLP12Password parameters can also be overridden. The SSLP12FilePath and SSLP12Password parameters specify the location and password of the PKCS12 keystore file used for SSL connections. For more information, see Security.
For information about how a rich client application user can override connection parameters using the Properties item on the pop-up menu of the Applications view, see Connection Parameters. For information about programmatically starting a rich client application instance using connection parameter overrides, see the HATS Rich Client Platform Programmer's Guide.
To control which connection parameters, if any, can be overridden, select one of the following radio buttons:
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.
When connection parameters are overridden at run time, HATS uses the overrides to create a transformation connection that differs from the one defined when the application was created. The choice of which connection HATS uses as a template for creating this new transformation connection is based on whether you specify the connectionName connection parameter:
When HATS creates a basic transformation connection, certain functions are disabled even if they were enabled for the connection chosen as the template connection. With the basic connection, pooling is always disabled, and the connect and disconnect time-outs are ignored, as are the connect and disconnect macros. The HOD connection parameters for the template connection, such as the host name, and port are copied from the template connection, and then any supplied connection parameter overrides are applied to create the new basic transformation connection. Notice that basic connections are always based on the application's default transformation connection.
When HATS creates a complete transformation connection, all connection settings associated with the connection named by the connectionName parameter are used, including pooling settings, connect and disconnect macros, and connect and disconnect time-outs. Your connection parameter overrides, if any, are then applied to create the pool specification used to create the new transformation connection.
If you specify the name of a background connection as the value of the connectionName parameter, and specify no other overrides, you effectively switch which connection will be used as the transformation connection for that application instance.
All HATS connections are based on a pool specification. A pool specification is an internal object that describes the properties of all connections created from it. The HATS toolkit actually creates pool specifications, and the runtime uses these connection files, like main.hco, to create actual Telnet connections at run time. When you specify connection parameter overrides, the HATS runtime will dynamically create a new pool specification object, if needed, to describe the properties of the new connection. Pool specifications are visible in the HATS administration panel for Web applications. Pool specifications dynamically created when parameter overrides are specified, regardless of whether the connectionName parameter is specified, are automatically destroyed when the last active connection is terminated, provided that pooling is not enabled.
Connection parameter overrides can be different for each user accessing a HATS application. For example, if each user specifies a different LUName override, HATS runtime creates a different pool specification for each user. Ensure that pooling is disabled for the original connection so the pool specification is automatically destroyed. If multiple users specify exactly the same overrides, only one pool specification will be created, and reused to create many identically-configured Telnet connections. For example, if an entire department of users specifies a particular host name override, only one new pool specification will be created and destroyed when no more connections are using that specification.
To be able to specify the connectionName parameter as a connection parameter override, the parameter must be enabled for overrides on the Connection Parameter Overrides page on the Other tab in the project settings editor.
HATS provides automatic disconnect functions to automatically disconnect the host if the browser is closed before the session disconnects. For more information see Automatic Disconnect and Refresh Web-only . For applications not using the automatic disconnect functions, 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 a supported version of Internet Explorer. Specification of the disconnectOnClose parameter is case sensitive. A sample URL request follows:
http://hostname/appname/index.jsp?disconnectOnClose=true
where appname is the name of your HATS application.
The following conditions are true when using the disconnectOnClose parameter:
For HATS rich client applications the asynchronous update function is enabled by default. You can disable the function by clearing the Enable asynchronous updates box. The primary purpose of the asynchronous updating mechanism is to automatically update the GUI view if the underlying host screen changes because the host sent a new screen. This provides the following advantages:
For HATS Web applications, the automatic disconnect and refresh functions can be performed by either a client pull method using an AJAX implementation or by a server push method using an applet implementation. To enable the AJAX implementation, select the Enable client pull (AJAX) option. To enable the applet implementation, select the Enable server push (applet) option. To disable both of these functions, select Disabled. The default is Disabled.
For HATS Web applications, you can configure the client pull (AJAX) implementation method, which includes the auto-disconnect and auto-refresh functions.
The auto-disconnect function provides the ability to detect when the browser has been out of contact with your HATS application for a predefined period of time. When detected, disconnect processing is performed to clean up resources associated with the browser session and thereby reduce the load on the server. To do this, the disconnect event is run, and the disconnect macro (if configured) is run.
The purpose of the auto-refresh function is to automatically refresh the Web page view of your HATS application if the underlying host screen changes because the host sent a new screen. This eliminates the requirement for the user to click the Refresh button to see asynchronously changed screens from the host.
With auto-refresh enabled, a Web page view is not automatically updated in the following cases:
<script>
disableBrowserRefresh(formID);
</script>
Unlike the server push (applet) implementation method, the client pull (AJAX) method does not require the use of certain browsers, but instead supports all browsers supported by HATS. Also unlike the server push (applet) method, an additional connection to the server is not required, thus simplifying configuration for the HATS Administrator. The client pull (AJAX) method is mutually exclusive of the server push (applet) method. If either of the client pull (AJAX) functions are enabled, then the server push (applet) configuration is ignored.
To configure the auto-disconnect and auto-refresh functions, use the following settings:
If auto-disconnect and auto-refresh are both disabled for the current page, when an HTTP session idle timeout is triggered, HATS disconnects the session and does not run the disconnect event.
There are two functions performed by the server push (applet) implementation method, also known as the asynchronous update applet:
When using the asynchronous update applet, in addition to the connection used to send transformed terminal screens from the HATS server to the user's browser, a separate socket connection is established between the applet running on the client and the HATS server. This separate socket connection is used to pass small messages, between the client and server, relating to asynchronous screen refreshes from the host and notification to the HATS server that the browser has been closed. Typically, the amount of traffic over this separate socket connection is very small. The sequence of events which occurs to set up this separate socket connection is as follows:
In order to run the applet, a Java-enabled browser is needed. See "System Requirements for Host Access Transformation Services" at http://www.ibm.com/support/docview.wss?uid=swg27011794 for the current list of supported browsers.
To configure the server push (applet) implementation method use the following settings:
The browser-side applet uses a TCP/IP socket to communicate with the HATS server. The host name of the server hosting the HATS application is needed to create the socket. If HATS is deployed on the same Web server specified by the browser's URL, then the host name parameter doesn't need be specified and the applet will use the Web server's IP address to establish the socket connection. If the HATS application is on a different server, the host name parameter must be specified with either a host name or an IP address.
Additional browser specific settings as well as non-Windows mask settings can be specified for the applet. These settings can be changed by editing the application.hap file.
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. Following are the default settings for the applet:
<class name="com.ibm.hats.common.AppletSettings">
<setting name="disconnectDelay" value="300000"/>
<setting name="enable" value="false"/>
<setting name="hostname" value=""/>
<setting name="ie" value="disconnect|refresh"/>
<setting name="nonWindows" value="disconnect|refresh"/>
<setting name="other" value="disconnect|refresh"/>
<setting name="port" value="0"/>
</class>
A brief explanation of each parameter:
The following browser-related settings determine the features to be used for a given browser or environment:
The following values may be used for the browser-related settings listed above:
To change the Internet Explorer behavior, replace disconnect with disconnectAlways. The parameter list for Internet Explorer then appears as follows:
<setting name="ie" value="disconnectAlways|refresh|local"/>
.
To enable asynchronous update applet client-side tracing, you must specify an HTML parameter, appletJavaConsoleTrace=true, on the HATS entry servlet Web address. For example,
http://myhost/myhats/entry?appletJavaConsoleTrace=true
You can use this feature to pass data from the user into the application. For example, you can allow the user to supply a user ID and password, and use them to run a macro.
For HATS rich client applications, the user overrides global variables using the Properties item on the pop-up menu of the Applications view. For more information, see Variables.For information about programmatically starting a rich client application instance using global variable overrides, see the HATS Rich Client Platform Programmer's Guide.
For HATS Web applications, to override a local global variable, you add an HTML parameter hatsgv_varName=newValue to the client's HTTP request. To override a shared global variable, the parameter name is hatssharedgv_varName.
To allow the user to create and set the value of a shared global variable named UserID, you can supply an input field by adding the following statement 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 user becomes the new value of the shared variable UserID. If you create the value by JavaScript, instead, and do not want the user to be able to enter the new value, you can 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 URL can be used in a GET request:
http://hostname/appname/entry?hatsgv_UserID=bob
To control which HATS global variables, if any, can be created or changed by a user's client request, click one of the following radio buttons:
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. Select the Shared global variable check box to indicate a global variable that can be shared. For more information, see Interacting with global variables.
If you want to edit a table entry, click Edit. The Remove button will delete the highlighted global variable from the list of exceptions.
You can customize the following client settings:
+--------------------------------------+
Text UTIL runtime.filters.CompressionFilter.doFilter()
17.50.10.140 11/27/06 Servlet.Engine.Transports : 1
enable compression: true 0000CBAx-81SRWWVmQfQ8-_47oK:-1
+--------------------------------------+
Text UTIL runtime.filters.CompressionFilter.doFilter()
17.50.10.140 11/27/06 Servlet.Engine.Transports : 1
size before: 25315 0000CBAx-81SRWWVmQfQ8-_47oK:-1
+--------------------------------------+
Text UTIL runtime.filters.CompressionFilter.doFilter()
17.50.10.140 11/27/06 Servlet.Engine.Transports : 1
size after: 4264 0000CBAx-81SRWWVmQfQ8-_47oK:-1
Clear this box to specify that HATS should send modified input field data even when the contents of the field are identical to the data supplied by the host. For example, if the host filled a field with ABC and the user typed ABC into the field, the typed data will be returned to the host.
Clear this check box to specify that the default tabbing order should not include protected, read-only fields.
For Web applications, you can selectively disable this function for an individual transformation by adding the following lines just after the </HATS:Form> tag in the transformation file. To selectively enable the function specify true instead of false.
<script>
autoAdvance = false;
</script>
For rich client applications, you can selectively disable this function for an individual transformation by overriding the needsAutoAdvanceSupport method on the individual transformation as shown below. To selectively enable the function return true instead of false.
public boolean needsAutoAdvanceSupport(boolean preferredValue) {
return false;
}
For DBCS considerations when using this setting see Enable automatic field advance.
Clear this box to specify that when auto advance is enabled, focus automatically advances to the next input field in the order of the input fields on the host screen.
For Web applications, you can enable this feature for a transformation by adding the following lines just after the </HATS:Form> tag in your transformation:
<script>
initialInputFocusFromCursor = false;
</script>
For rich client applications, you can enable this feature for a transformation by overriding the isInitialFocusAtCursorPosition method on the individual transformation as shown below.
public boolean isInitialFocusAtCursorPosition() {
return false;
}
<class name="com.ibm.hats.common.RuntimeSettings">
<setting name="nextFieldForDropDown" value="true"/>
</class>
For DBCS considerations when using this setting see Overwrite mode (initial).
For DBCS considerations when using this setting, see Select all text on focus.
You can selectively disable this function for an individual transformation by overriding the needsArrowKeyNavigationSupport method on the individual transformation as shown below.
public boolean needsArrowKeyNavigationSupport(boolean preferredValue) {
return false;
}
To selectively enable the function return true instead of false.
If screen customizations exist for these screens, all actions defined in the customization are executed, including applying transformations. However, the type-ahead data is not actually placed into the rendered transformation before being submitted to the host. Instead, it is sent directly to the host as previously typed, bypassing the transformation completely. In this manner, this functions much like a terminal emulator's type-ahead support. What this means to the user is that type-ahead data must conform to what each native host screen expects, not what the applied transformation expects.
If you clear this box, the Type-ahead field setting is cleared in Operator Information Area on the Rendering tab. For information about displaying the type-ahead data in the operator information area, see Type-ahead field.
Use these settings to select which macros to enable for content assistance. While editing a macro on the Source tab of either the Macro Editor or the Visual Macro Editor, press Ctrl+Space to invoke content assistance.
These settings apply only to HATS standard (JSR 168 or JSR 286) portlet projects. They can be used to help develop a portlet communication solution. For more information, see Portlet communication. For considerations when using bidirectional language support, see Portlet support.
Use these settings to define properties received through WebSphere Portal from other JSR 168 portlets (HATS or non-HATS) on the portal server. Click Add to add a new property. In the Property field enter the name of the property that is being received. The name must match the property name used by the sending portlet, for example, the same property name used by the Send global variable action in a HATS JSR 168 sending portlet. In the Global variable field enter the name of the global variable to use to store the value of the received property. If the global variable is indexed, enter the index to use. Select the Shared check box if the global variable is a shared global variable.
When you click Finish, the property is added to the project's application.hap file. In addition, a Web Services Description Language (WSDL) file is created, if one does not already exist, and a receive property is defined in the WSDL file. The name of the WSDL file is <project_name>.wsdl. The WSDL file is required to wire the portlets using the WebSphere Portal wiring tool. The portlet.xml file is updated to reference the location of WSDL file.
If you click Remove, the property is removed from the project's application.hap file, but it is not removed from the WSDL file. You can edit the WSDL file and use the WSDL editor to remove the property.
Use these settings to define events received through WebSphere Portal from other JSR 286 portlets (HATS or non-HATS) on the portal server. Click Add to add a new event. In the Event name field enter the name of the event that is being received. The name must match the event name used by the sending portlet, for example, the same event name used by the Send global variable action in a HATS JSR 286 sending portlet. In the Global variable field enter the name of the global variable to use to store the value of the received event.
Click Advanced to set more options if necessary.
On the Advanced Options page, specify either Overwrite the global variable with the new value, or Overwrite a specific index of the global variable with the new value, including the Index to overwrite and the Event payload type of the object. Use the Browse button to assist in entering a valid value type. The type you select must be Serializable. If not, an error message is displayed. The type also must match the type used by the sending portlet, for example, the same type used by the Send global variable action in a HATS JSR 286 sending portlet. Select the Shared check box if the global variable is a shared global variable.
When you click Finish, the event is added to the project's application.hap file, and the portlet.xml file is updated. No WSDL files are involved with JSR 286 portlet communication.
The Source tab displays the tags and values in the application.hap file for all the settings you selected, or for which you took the defaults, 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 in the application.hap file directly by editing the source under the Source tab, and they will be reflected on the appropriate tabs of the project editor.
You can use HATS preferences to control the appearance and behavior of HATS Toolkit. These preferences make HATS Toolkit more accessible or simplify programming tasks. To work with HATS preferences, click Window > 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:
This preference has no affect on what is displayed under the Java Source folder of the HATS Projects view.
HATS checks the license settings of projects in a workspace on startup and prompts the user to update the license settings if any of the projects don't match the master license settings. Clear this check box to disable checking the license settings at startup.
There are more preferences which govern other behaviors related to HATS. To use these preferences, expand HATS in the preferences tree and click one of the sub categories:
When a package name is created for a new artifact, the name of the project is substituted for {project name}. Formatting on this substitution occurs to ensure a valid package name is created (for example, spaces are converted to underscores).
When you modify your HATS preferences, you can click Apply to see the results immediately in HATS Toolkit. 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 Toolkit, and you want to copy them to other development workstations, from the Rational SDP menu bar select File > Export > General > Preferences to save your preferences as an .epf file. Transfer the file to each workstation where you want to use it, or make it available over your network. Select File > Import > General > Preferences to import the preferences file.
HATS Toolkit appearance and behavior can also be affected by using other preferences available with Rational SDP.
For example, you can use the Label Decorations preference to enable other toolkits such as Java Compile and CVS to decorate HATS labels and images displayed in the HATS Projects view. When there is an error, a red-mark can be displayed next to the file. When checking out files from a CVS repository, version numbers can be displayed next to the file names. To access the Label Decorations preference in Rational Application Developer: