News in NetPhantom 3.61 Build 1400
The following new features are implemented in NetPhantom 3.61 Build 1400.
The Application INI fileIn order to use the new features below, a new INI file is required for the application. It should be stored in the same directory as the runtime file (.NPR), but with the file extension ".INI". If you have an application called MYAPP.NPR in the directory somewhere/myapp, the INI file should be named MYAPP.INI (note: in upper case) in the same directory. The text file should be saved in ISO-8859-1 codepage (e.g. the same codepage as for "normal" HTML pages [notepad], i.e. not in EBCDIC). Example of an INI file for an application: [base] Client properties for an applicationClient properties can now be defined in the Application INI file (as described above), in the [clientProperties] section. These properties will be transferred to the client upon initialization of the runtime file and can be retrieved with the Java API function SessionManager.getProperty. In cases where multiple runtime files are used ("merge on-the-fly"), the initialization of the runtime file depends on the matching host screen and can sometimes be done in a later stage, thus not directly when the client connects to the server. Example of an application INI File [base] Bitmap in application areaThe application area attributes (where panels are displayed when running inside an application panel or a browser) can now be specified. In the application.INI file, specify the entry desktop.image=xpFileName and desktop.color in the [clientProperties] section as described below. The desktop.image setting uses two parameters x and p just in front of the file name. These parameters indicate:
The FileName parameter should be a file relative to the RESURL of the client (e.g. "Image/myback.gif") or a specification of how and where to load the image (e.g. "http://myserver/Image/myback.gif"). When many runtime files are used ("merge on-the-fly") and one bitmap has been set for the desktop area
and a new runtime file becomes initialized, the bitmap will remain unless the new runtime file has
specified a new image in the Application INI file (or an empty bitmap).
Background color in application areaSimilar to the bitmap specification, a background color can be set for the application area when a bitmap that is not stretched to fit the panel is not present. Specify the entry desktop.color=color in the [clientProperties] section in the application INI file. This setting must be an RGB (Red-Green-Blue) value in hexadecimal format, e.g. "0xC0C0C0" for dark gray, or a name of a system property (that specifies the color). For example, the setting desktop.color=0x005C5C could be a desktop background color. The bitmap and color properties can also be specified as parameters to the NetPhantom Client, when running as a Java Application: java se.entra.phantom.client.Phantom or when running as an Applet: <applet width="100%" height="100%" Tooltip textAn application can have tooltip text for every component supporting this in an application, e.g. the pull-down menus, menu items and pushbuttons (entry-field or similar components does not [yet] support this feature due to Java/Swing limitations). The tooltip text should be either a simple text string (e.g. "Select this item to perform something") or in HTML format (e.g. "<html>This is a longer text that <br>can be written <br>on multiple lines"). On the server side, a Java API is available ("setTooltipText" in VirtualPullDownMenu, VirtualMenuItem and VirtualControl or "setProperty" in VirtualInterface). For a runtime application, a predefined tooltip text can be specified using the Application INI file setting tooltipTextFile=filename in the [base] section, for example: [base] The file "MYAPP.TT" should be in the format described below (in the ISO-8859-1 codepage). Note that PANELID and CONTROLID are separated by a dash (-). ; Comment line begins with a semicolon, but The html-filename specifies an external file (relative to the runtime file) and must be a valid HTML file (in the ISO-8859-1 codepage). The CONTROLID can also be set to *MENUx where x specifies the pull-down menu number (as main pull-down menus do not have a control ID). Tooltip texts are displayed after a short while when the mouse pointer is moved over a component. However, a longer text may be specified for menu items, and the end-user can sometimes not be able to read all the contents of the tooltip. Special settings for how tooltip texts are displayed for menu items is therefore available and should be specified in the [clientProperties] section of the Application INI file, see below. The Java/Swing ToolTipManager contains numerous properties for configuring how long it will take for the tooltips to become visible, and how long until they are hidden. Consider a panel that has different tooltip texts based on where the mouse is. When the mouse moves into the panel and over a region that has a valid tooltip, the tooltip will become visible after initialDelay milliseconds. After dismissDelay milliseconds the tooltip will be hidden. If the mouse is over a region that has a valid tooltip, and the tooltip is currently visible, when the mouse moves to a region that doesn't have a valid tooltip the tooltip will be hidden. If the mouse then moves back into a region that has a valid tooltip within reshowDelay milliseconds, the tooltip will immediately be shown, otherwise the tooltip will be shown again after initialDelay milliseconds. The following settings are available for displaying tooltip texts for menu items:
Example Application INI file: [base] Example MYAPP.TT file: ADMIN-*MENU1: <html> <body>Provides file transfer capabilities between server and client and also to quit the application. </body> </html> ADMIN-*MENU2: <html> <body>The following topics are handled here: <ol> <li>Licensing, <li>Configuration of the server, <li>Access management (users and groups), <li>Service functions, <li>Upgrade functions. </ol> </body> </html> ADMIN-*MENU3: Handles enabling and reloading of defined and loaded applications ADMIN-*MENU4: Performs client related tasks ADMIN-*MENU5: Performs server auditing, tracing and event logging tasks ADMIN-*MENU6: The About menu ADMIN-FILEMAN: One of the most complex panels on the client side! ADMIN-ABOUT: The most common panel in all applications! Private Class LoaderThe NetPhantom class loader normally loads Java classes created from REXX files from the CLASSPATH setting of the Java VM. When the application runtime file was located outside the "normal" directory structure, the CLASSPATH had to be adjusted to allow class files to be loaded. The new private class loader for an application has the same functionality as to adjust the CLASSPATH to include the parent directory of the runtime file, i.e. if an application is loaded from /usr/myuser/mydir/myapps/prod/myapp/MYAPP.NPR, the CLASSPATH for the private class loader would be prepended with the directory /usr/myuser/mydir/myapps/prod before the normal CLASSPATH setting. To enable the private class loader, specify privateClassLoader=1 in the [base] section of the Application INI file: [base] Hiding unauthorized menu items in Phantom Session BoosterMenu items that a user is not allowed to access are normally disabled in Phantom Session Booster. Support to hide them rather than to disable them is now added for NetPhantom. In order to activate this new setting, specify hideUnauthorizedMenuItems=1 in PSB.INI. |