You can use the Template Editor to author query and display templates.
To work with query templates, select Data Services from the main menu and then select Query Templates. The Template Editor for creating and modifying query templates appears.
To work with display templates, select Visualization Services from the main menu and then select Display Templates. The Template Editor for creating and modifying display templates appears.
This section describes the common features of Template Editor applets. The Template Editor is typically accessed via the main menu. For specific template editor functionality, see the appropriate sections of this help chapter. This guide will show you how to configure each type of object through the Template Editor. For a more detailed reference on each parameter for the different object types, refer to the Connector Parameter Reference (for connector and query object parameters) and the Applet Reference (for applet parameters/properties).
Note: The GUI of the Template Editor has many configurable components, and as a result, it requires a minimum 1024x768 resolution display. Additionally, the system font should be set to a small font size (not large fonts) or the graphic elements will overlap due to inadequate room to fit all of the components on the page.
At the bottom of the editor are a series of buttons and an indicator path/name of the currently loaded template, or "Untitled" if a new template has been initialized.
Select the New button to display a template type selection dialog. Using the list box, select the type of template you wish to create. A new template will be created using default values with a name of "Untitled". The appropriate configuration tabs are displayed.
Select the Load button to display a template selection dialog. The left-hand navigation tree indicates a list of the folders defined below the Templates subdirectory on the server. When you select a folder, a list of previously saved templates appear on the right. If a template is currently loaded into the template editor, the directory and name of the template file will be selected. If no template is loaded into the template editor, no directory will be selected and the template name defaults to Untitled.
You may also delete a template from this dialog by selecting a template and pressing the Delete button. You can create new sub-directories by pressing the New Folder button.
Selecting the "Save" button will save the currently loaded template, except in the case of a newly created template, in which case it will behave identically to the "Save As" button. The "Save As" button will open a very similar dialog to the Load dialog, except that the template name is now an editable data entry field. Selecting a pre-existing template from the list and pressing OK will ask for confirmation before overwriting the original template, but exercise general caution when naming and saving templates.
A folder may be "hidden" from view by using an underscore as the first character of the directory/folder name (although templates may still be placed in this directory and referenced in Web pages).
If the currently loaded template is a query template, the Test button can be used to open a new browser window and show the results of the query in HTML, XML, or CSV format. Any errors will also be displayed in this new window.
If the currently loaded template is a query template (does not apply to Tag Query or Xacute Query), selecting the Token button will display a dialog. [Param.1] (and other available variable expressions) can be copied and pasted (or typed) from the list of available tokens.
The use of tokens allows the user to set specific parameter variables to include in a query that can be given specific values at the time the query is run. Depending on the query object type and the underlying connector, different parameters may be available. Refer to the specific connector documentation for more details.
For example, a quality chart may be displayed on a page with a list of batches contained in a grid. Depending on which batch is chosen, the quality chart is updated showing the data for that batch. A filter expression in an SQL Query Template could be something like the following:
BatchHistory.BatchID = '[Param.1]'
Then at runtime, you can reference the query object and set the variable to the specific BatchID value through Web scripting. Other examples of tokens include start and end dates which are referenced with [SD] and [ED] respectively. The use of placeholder parameters is discussed in more detail in the IDBC Connector guide.
Unlike typical Microsoft Windows applications, Web applications (either HTML pages or Java applets) tend to use a slightly different metaphor for user input to allow usage on a wide range of operating systems and user interface shells. As such, "double clicking" has no effect on list boxes and tree lists. With these types of platform-neutral applications, selecting an item from a list, followed by pressing an "action" button is the more typical UI metaphor.