How to customize window features

You can add or remove buttons to customize the CFT Navigator GUI . When you use new buttons, a dialog box is displayed where you can enter user parameters. Once you validate these parameters, the system sends them to a procedure executed on the server that creates an HTML result file. The resulting HTML file is then displayed in a new window in the GUI.

Activating the UI customization

Transfer CFT UI customization is described in an XML file that is downloaded by the Transfer CFT UI. This file must be referenced in the configuration file. For more information, refer to the sample file delivered with the product: copilot/wwwroot/guiextensions/plugin.xml

To activate GUI customization, set the UCONF [copilot.batches.xmldefinition] identifier.

Example

CFTUTIL uconfset id=copilot.batches.xmldefinition,value=guiextensions/plugin.xml

Note The plugin.xml is used as the default name for the customization file.

Configuring the plugin.xml file

When you configure the plugin.xml file, respect the following conventions:

  • the first line contains the standard XML identifier tag:

<?xml version="1.0" encoding="ISO-8859-1"?>

  • the next line contains a tag that identifies the product to customize:

<product type="CFT">

</product>

  • customization definition is enclosed within the product tags (<product type=".CFT"> and </product>)

Customization

The customization definition comprises a set of actions on the GUI components:

  • Main toolbar
  • Log filter window
  • Catalog filter window
  • Transfer CFT object window (CFTPART, CFTSEND, …)

For each component you can either add or remove a button.  

Removing a button

To remove a button, add a remove tag in the GUI component along with the button identifier. The identifier is displayed in the GUI  tooltip text.

Adding a button

To insert a button, put an add tag in the component object.

Defining input parameters

Input parameters define all the properties that will be sent to the procedure. These parameters must be inserted in an add section of a component. Every procedure input parameter must have a type.

Defining output parameters

The output parameters are mandatory to display the result of the procedure defined in the script tag. After sending the parameter values to the procedure, the GUI waits for the result file during time-out seconds. Once the result file is available, the GUI opens a browser window to display the HTML result file. The HTTPDirectory tag specifies a remote folder where the result file will be accessible from the browser. This directory can be absolute or relative as well.

Writing a procedure

The following code shows how to add a button to the main toolbar. The procedure procedure.bat must be located in the same directory as the binary CFT Navigator server files.

After you click Finish, each input parameter can be referenced in the procedure using the standard Transfer CFT substitution variables. The value of the parameter TEXT is referenced using &TEXT notation in the procedure. The &TEXT variable will be substituted.

A special variable &FOUT is also available in the procedure. This forced value contains the name of the result output file. The output file must be accessible from an URL supplied in the tag <HTTPDirectory>. The batch should only create the output file when it ends in an atomic method.  

The procedure must create an HTML file.

Related Links