Skip to main content

%ZEN.Template.studioTemplate

deprecated abstract class %ZEN.Template.studioTemplate extends %ZEN.Component.page

Base class for Zen-based Studio Templates.
Zen-based Studio Templates extend this class.

Property Inventory

Method Inventory

Parameters

parameter AUTOLOGOUT = 0;
Do not use AutoLogout logic for template pages.
parameter AUTONS = 1;
If auto-switch namespace to whatever $NAMESPACE is passed in
parameter CHARSET = UTF-8;
Prevent IE issues with non-UTF8 char-sets.
parameter GLOBALTEMPLATE = 1;
If this is true then even if this template is tied to a specific namespace it will be available in any namespace and it will be up to the template to make sure it looks for any specific data in the target namespace.
parameter HELPID;
DOCBOOK Topic Id that offers help for this template.
parameter RESOURCE = %Development:USE;
Users must have %Development:USE to access any Studio templates.
parameter TEMPLATEACCELERATOR;
Accelerator key for this template in Studio, 0-9.
User will press Ctrl+Shift+key to activate.
parameter TEMPLATEDESCRIPTION;
Short description of the template to show in Studio.
If DOMAIN is defined this will be localized.
parameter TEMPLATEGROUP;
If this is a TEMPLATEMODE="new" then this is the name of the tab in Studio this template is dispayed on. If none specified then it displays on 'Custom' tab.
parameter TEMPLATEMODE = template;
Specifies what type of template this is: 'template', 'new', or 'addin'. 'template' is the default and this creates code that is inserted into the current document, 'new' is a template that appears on the dialog when you click the new button, 'addin' is a template that appears on the addin menu which does not generate any output.
parameter TEMPLATENAME;
Name of the template to show in Studio.
If DOMAIN is defined this will be localized.
parameter TEMPLATENOOUTPUT = 0;
Set this true (1) if this template does not generate any output, only applies to 'template' types but it prevents Studio from needing to make the current file writable.
parameter TEMPLATETITLE;
Title of the template to show in the template window.
parameter TEMPLATETYPE = *;
Comma separated list of 'CSP', 'CSR', 'MAC', 'INT', 'INC', 'BAS', 'CLS' to say what type of code this template generates; CSP, CSR, Routine, or Class code. You can also specify '*' for all types.
parameter VALIDATEXML = 0;
Inherited description: Validate user pages

Properties

property DocumentName as %ZEN.Datatype.string (ZENURL = "Name");
Name of current document within Studio.
Property methods: DocumentNameDisplayToLogical(), DocumentNameGet(), DocumentNameIsValid(), DocumentNameLogicalToDisplay(), DocumentNameLogicalToOdbc(), DocumentNameNormalize(), DocumentNameSet()
property DocumentNamespace as %ZEN.Datatype.string (ZENURL = "DocumentNamespace");
Namespace of current document within Studio.
Property methods: DocumentNamespaceDisplayToLogical(), DocumentNamespaceGet(), DocumentNamespaceIsValid(), DocumentNamespaceLogicalToDisplay(), DocumentNamespaceLogicalToOdbc(), DocumentNamespaceNormalize(), DocumentNamespaceSet()
property Language as %ZEN.Datatype.string (ZENURL = "Language");
Current language within Studio (e.g., "cache").
Property methods: LanguageDisplayToLogical(), LanguageGet(), LanguageIsValid(), LanguageLogicalToDisplay(), LanguageLogicalToOdbc(), LanguageNormalize(), LanguageSet()
property Namespace as %ZEN.Datatype.string (ZENURL = "Namespace");
Current namespace within Studio.
Property methods: NamespaceDisplayToLogical(), NamespaceGet(), NamespaceIsValid(), NamespaceLogicalToDisplay(), NamespaceLogicalToOdbc(), NamespaceNormalize(), NamespaceSet()
property Project as %ZEN.Datatype.string (ZENURL = "Project");
Current project within Studio.
Property methods: ProjectDisplayToLogical(), ProjectGet(), ProjectIsValid(), ProjectLogicalToDisplay(), ProjectLogicalToOdbc(), ProjectNormalize(), ProjectSet()
property SelectedText as %ZEN.Datatype.string (ZENURL = "SelectedText");
Current selected text within Studio.
Property methods: SelectedTextDisplayToLogical(), SelectedTextGet(), SelectedTextIsValid(), SelectedTextLogicalToDisplay(), SelectedTextLogicalToOdbc(), SelectedTextNormalize(), SelectedTextSet()
property User as %ZEN.Datatype.string (ZENURL = "User");
Current user within Studio.
Property methods: UserDisplayToLogical(), UserGet(), UserIsValid(), UserLogicalToDisplay(), UserLogicalToOdbc(), UserNormalize(), UserSet()
property helpId as %ZEN.Datatype.string [ InitialExpression = ..#HELPID ];
DocBook topic id used to show help for this template.
Property methods: helpIdDisplayToLogical(), helpIdGet(), helpIdIsValid(), helpIdLogicalToDisplay(), helpIdLogicalToOdbc(), helpIdNormalize(), helpIdSet()

Methods

classmethod %AddToProject(Name As %String) as %Status
Add this named item to the current project in Studio. If you have multiple items then call this method multiple times. The Name must contain the type of the item e.g. 'User.Test.cls' is a class, and 'TEST.mac' is a MAC routine.
classmethod %AddToSourceControl(Name As %String) as %Status
Add this item to source control. If you have multiple items then call this method multiple times. The Name must contain the type of the item to add e.g. 'User.Test.cls'.
method %DrawTitle(pSeed As %String) as %Status
Provide HTML for standard template html title box.
method %OnDrawHTMLMeta() as %Status
Inherited description: This callback is called at the start of the HTML HEAD section of the page (just after the title).
It allows a page to write out meta tags, if desired. The default implementation writes out an IE-specific meta tag to ensure that IE 9 and 10 don't fall back into Compatibility Mode when we are returning an HTML5 page (i.e. cssLevel is set to 3).
classmethod %OnSubmit(pSubmit As %ZEN.Submit) as %Status
Inherited description: This callback is called when a form on this page is submitted. pSubmit is a %ZEN.Submit object containing details of the form submit.
Subclasses override this method.
method %OnTemplateAction() as %Status
This method is called when the template is complete. Any output to the principal device is returned to the Studio. This is implemented by subclasses.
classmethod %SetClassName(Name As %String) as %Status
If you are making a new class template then Studio needs to be told the name of this class. This is done by calling this method in the final page passing the name of the class.
classmethod %TemplateHeader()
Internal method to output the start of the XML data section
classmethod IsEnabled() as %Boolean
Return false from this method to disable this template (for example based on the server platform)
method IsValidClassName(pCls As %String) as %String [ ZenMethod ]
Validate that the given class name is valid.
Returns an error message if invalid.
classmethod LocalizeName(id As %String, ByRef name As %String, ByRef description As %String) as %Status
Localize the name and description for this template.
classmethod OnHTTPHeader(ByRef OutputBody As %Boolean) as %Status
Make sure template generates correct format output.
classmethod OnPage() as %Status
Render the contents of this ZEN page.
classmethod OnPostHTTP()
For final page, make sure we send the correct info to the Studio.
classmethod OnPreHTTP() as %Boolean
Make sure template runs in correct namespace.
clientmethod adjustSize() [ Language = javascript ]
Adjust size and position of components on this page.
clientmethod canFinish() [ Language = javascript ]
Return true if this template can Finish (i.e., enable the Finish button).
This is implemented by subclasses.
clientmethod canGoBack() [ Language = javascript ]
Return true if this template can go to the previous page (i.e., enable the Back button).
This is implemented by subclasses.
clientmethod canGoNext() [ Language = javascript ]
Return true if this template can go to the next page (i.e., enable the Next button).
This is implemented by subclasses.
clientmethod cancelTemplate() [ Language = javascript ]
Close the template window.
clientmethod finishTemplate() [ Language = javascript ]
Finish the template: fire the template action code
clientmethod formValidationHandler() [ Language = javascript ]
Validation handler for form built-into template.
clientmethod hasMultiplePages() [ Language = javascript ]
Return true if this template has more than one "page". This will display Back and Next buttons. This is implemented by subclasses.
clientmethod nextPage() [ Language = javascript ]
Go to the next page of the template (if there is one).
This is implemented by subclasses.
clientmethod onfinishHandler() [ Language = javascript ]
This is called when the template is finished;
clientmethod onkeydownHandler(evt) [ Language = javascript ]
This client event, if present, is fired when a keydown event occurs on the page.
clientmethod onlayoutHandler(load) [ Language = javascript ]
This client event, if present, is fired when the page is first loaded or whenever it is resized.
If this is called at load time, then load will be true.
clientmethod onloadHandler() [ Language = javascript ]
This client event, if present, is fired when the page is loaded.
clientmethod onstartHandler() [ Language = javascript ]
This is called when the template is first displayed; This provides a chance to set focus etc.
clientmethod previousPage() [ Language = javascript ]
Go to the previous page of the template (if there is one).
This is implemented by subclasses.
clientmethod showDocumentation(topic) [ Language = javascript ]
Open a browser window to show documentation.
clientmethod showHelp() [ Language = javascript ]
Show the help message for this template. This opens a browser and goes to the DocBook application using the value given by helpId.
clientmethod updateState() [ Language = javascript ]
Update the state of the template buttons. Subclasses should call this method when they need to update the state of the footer buttons.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab