docs.intersystems.com
Home  /  Application Development: Additional Options  /  Using Studio  /  Using Studio Templates


Using Studio
Using Studio Templates
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


This chapter describes how to use Studio Templates.
Templates are a repeatable way to insert functionality into Studio editor windows. There are two types of templates:
Note:
To ensure that Studio templates open quickly, disable the automatic detection of proxy settings in Internet Explorer.
  1. Open Internet Explorer and select Tools > Internet Options and the Connections tab.
  2. Select LAN Settings and uncheck any checked boxes. Make sure nothing on this page is checked and then select OK twice to close the Internet Options dialog.
Accessing Studio Templates
You can open a template using Tools > Templates, as well as with the right-click menu in the editor window. Each template is associated with one or more document types; only templates associated with the current window's document type are shown in the Template list.
There are two styles of text templates: simple and interactive. A simple template inserts text at the cursor point with no further user interaction. An Interactive Template displays one or more screens soliciting additional information, like a wizard.
Any text that is highlighted when you open a template is replaced by the template. Many templates use the currently highlighted text as input to the template program.
Standard Studio Templates
Studio comes with a set of templates. You can see a list of all templates in Studio in the %SYS namespace, Workspace window, Namespace tab, under CSP files. To see templates usable in the current document, use Tools > Templates > Templates. These templates are described below.
Note:
By default, Studio templates use a session timeout of 90 seconds. If you are entering data into a Studio template, the session ends after 90 seconds of no user input.
Templates
This section contains three tables defining the templates available in Studio:
Templates
Template Description
HTML Color Select to insert an HTML color value string (such as #F0F0F0) at the cursor point.
HTML Input Select to insert an HTML input control at the cursor point.
HTML Script Select to insert a <SCRIPT> tag at the cursor point, with the specified language and content.
HTML Table Select to insert an HTML table at the cursor point with the specified characteristics. Select Preview to display a preview window.
HTML Tag Select to insert an HTML tag at the cursor point, selected from a list with specified attributes. Or if you highlight an existing HTML tag and then invoke the template, you can edit the displayed attribute values.
Example of an Interactive Template, the HTML Color Table
Class Definition Templates
Many of the templates are available for use in class definitions (they can be useful in &html<> blocks). In addition, the following templates are available:
Class Definition Templates
Template Description
SQL Statement Select to insert code for a specified SQL Statement at the cursor point. Select Preview to see test results of the table (using data in the database) in a popup preview window. You can specify whether the template returns only the SQL text or an embedded SQL cursor based on the SQL text. It can also return a %ResultSet object based on the SQL text, but this is not recommended in InterSystems IRIS.
Web Form Wizard Select to open a Wizard with which you can create a CSP form, specifying class members and a table style for the form to use.
Add-In Templates
The Tools > Add-Ins menu contains a list of wizards with which you can add items to your project. The menu contains the following add-ins.
Add-Ins
Add-In Function For More Information
.Net Gateway Wizard Imports a DLL assembly file from .NET and creates a set of corresponding classes. Using the Object Gateway for .NET
Activate Wizard This wizard option is not for use with InterSystems IRIS Data Platform. For documentation on this wizard, click here.
Java Gateway Wizard Imports a class file or a jar file from Java and creates a set of corresponding classes. Using the Java Gateway
SOAP Wizard Reads a WSDL (Web Services Description Language) document and creates one or more Web client classes or Web service classes. Creating Web Services and Web Clients
XML Schema wizard Reads an XML schema and creates a set of corresponding classes. Using the XML Schema Wizard in Using XML Tools.
XSL Translate Wizard Transforms an XML file using a specified XSL stylesheet. Performing XSLT Transformations in Using XML Tools.