Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / %ZEN.application
Private  Storage   

%ZEN.application


class %ZEN.application extends
%RegisteredObject, %CSP.Page

This class is used to define a ZEN application. This is an instantiable CSP page.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
7 1 8


Summary


This is a Zen Application class.

Properties
%StatusCode

Methods
%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %DrawStyleHTML
%Extends %GetApplicationName %GetParameter %GetUserPackages
%IncrementCount %IsA %IsModified %LinkCSS
%LinkScript %New %NormalizeObject %ObjectModified
%OnGetJSResources %OriginalNamespace %PackageName %RemoveFromSaveSet
%SerializeObject %SetModified %ValidateObject ConvertParameter
Decrypt Encrypt EncryptBroker EscapeHTML
EscapeURL HyperEventBody HyperEventCall HyperEventFrame
HyperEventHead Include InsertHiddenField InsertHiddenFields
IsPrivate Link OnHTTPHeader OnPage
OnPageError OnPostHTTP OnPostHyperEvent OnPreHTTP
OnPreHyperEvent Page QuoteJS RewriteURL
ShowError StartTimer StopTimer ThrowError
UnescapeHTML UnescapeURL

Subclasses
%DeepSee.UserPortal.Application %DeepSee.extensions.clusters.ZenApplication %ZEN.Portal.Application
CSPX.Portal.Application

Parameters


• parameter APPLICATIONNAME;
Optional name of this application.
If not defined, the class name of the application is used. This is used for display purposes within some utilities but it not used at run-time.
• parameter CSS3INCLUDES;
Comma-separated list of additional CSS3 include files that should be included for every page within the application.
This is used when the page uses CSS3. The CSS files will be included after any component style sheets and before styles defined by this application class or the page class.
• parameter CSSINCLUDES;
Comma-separated list of additional CSS include files that should be included for every page within the application.
The CSS files will be included after any component style sheets and before styles defined by this application class or the page class.
• parameter HOMEPAGE;
This is the URL of the main starting page of this application.
• parameter JSINCLUDES;
Comma-separated list of additional JS include files that should be included for every page within the application.
• parameter USERPACKAGES;
Comma-separated list of User class packages whose HTML class and style definitions are in pre-generated include files. These include files will be used by every page within the application.
• parameter USERSVGPACKAGES;
Comma-separated list of User class packages whose SVG class and style definitions are in pre-generated include files. These include files will be used by every applicable page within the application.

Properties


• property %StatusCode as %Status;
Status code for this object. If a page encounters errors when trying to create the application object instance, this property will be set to an error code.

Methods


• classmethod %DrawStyleHTML(pSuper As %Boolean = 0, pCSSLevel As %Integer = 2)
Write out HTML/CSS style sheet defined for this application.
This is based on the XData block, Style.
This style sheet is used to provide application-wide overrides for styles.
• classmethod %GetApplicationName()
Return the display name of this application class.
• classmethod %GetUserPackages(Output pUserPackages As %String, Output pUserSVGPackages As %String)
Return the USERPACKAGE and USERSVGPACKAGE lists defined for this application class.
• classmethod %LinkCSS(pFile As %String) as %String
Return string used to include a CSS file. [Previously private]
• classmethod %LinkScript(pFile As %String) as %String
Return string used to include a script file. [Previously private]
• method %OnGetJSResources(ByRef pResources As %String) as %Status
Applications can implement this callback method in order to define a set of client-side resources: javascript strings that have been localized.
This is the same as the Zen page callback method except that it is shared by all pages within an application.
This method should fill in the array pResources with a set of localized strings, indexed by resource id:
	 Set pResources("MyId") = $$$Text("Some string")
Javascript methods can refer to these resources using the helper function zenGetResource:
 alert(zenText('MyId'));
Zen defines a set of built-in resource strings using this mechanism. These have a "zen" prefix to keep them seperate from user ids.
Be sure to define the DOMAIN for your application class if you override this method.
• classmethod OnPage() as %Status
Default OnPage handler-- only called if no HOMEPAGE is defined for this application.
• classmethod OnPreHTTP() as %Boolean
Event handler for PreHTTP event: this is invoked before the HTTP headers for a CSP page have been sent. All changes to the %CSP.Response class, such as adding cookies, HTTP headers, setting the content type etc. must be made from within the OnPreHTTP() method. Also changes to the state of the CSP application such as changing %session.EndSession or %session.AppTimeout must be made within the OnPreHTTP() method. It is prefered that changes to %session.Preserve are also made in the OnPreHTTP() method as this is more efficient, although it is supported in any section of the page. Return 0 to prevent OnPage from being called.