InterSystems IRIS Data Platform 2020.4 > Class Reference > ENSLIB namespace > %ZEN.Controller

%ZEN.Controller

abstract class %ZEN.Controller

This utility class provides a centralized place for managing events between the client and the server.
There are no user-callable methods within this class.

Method Inventory

Parameters

parameter DOMAIN = %Utility;

Methods

classmethod %BeginChangeTracking() as %Integer [ Language = objectscript ]
Start capturing changes to objects.
classmethod %BeginJSTranslation() as %String [ Language = objectscript ]
This method begins JS translation of Write commands. Returns a token that should be passed along to %EndJSTranslation
classmethod %ChangeNS(pNS As %String) as %Status [ Language = objectscript ]
Change namespace for the context of this page (see the AUTONS parameter)
classmethod %DeserializePage(pHeader As %String, pBody As %String, Output pObjects) as %Status [ Language = objectscript ]
Takes the serialized state of a set of client components and recreates the set of server-side objects.
On return, pObjects is array of objects subscripted by component index.
As a side-effect it will set %page.
classmethod %EndChangeTracking(pMaxIndex As %Integer, pMode As %String = "", pTrace As %String = "") [ Language = objectscript ]
Stop capturing changes to objects; Generate JS to sync client to server changes. If pMode is "page" then this is called at page render time. pTrace is provided for diagnostic purposes.
classmethod %EndJSTranslation(pToken As %String) [ Language = objectscript ]
This method ends JS translation of Write commands.
classmethod %GetOREF(orefint As %Integer) as %RegisteredObject [ Language = objectscript ]
Internal helper method: convert integer to oref [Previously private]
classmethod %GetStackTrace(pIgnoreTop As %Integer = 0) as %String [ Language = objectscript ]
Returns a stack trace, pass pIgnoreTop if you want to skip any stack levels at the top. If you want the stack from the most recent error or exception, then pass -1 for pIgnoreTop, otherwise $ECODE is cleared and $STACK gives the current stack.
classmethod %InvokeFormSubmitCallback(pClass As %String, pMethod As %String, pSubmit As %ZEN.Submit) as %Status [ Language = objectscript ]
Invoke the OnSubmitForm callback for a form.
classmethod %InvokeFormSubmitHandler(pSubmit As %ZEN.Submit) as %Status [ Language = objectscript ]
For a bound form, invoke the submit handler for the associated DataModel class.
classmethod %MaterializeComposites() as %Status [ Language = objectscript ]
Internal method.
This method tests if there are any unmaterialized composite elements on the current page. If any are present they will be materialized (their children are created).
classmethod %SetNS(pNS As %String = $namespace) as %Status [ Language = objectscript ]
Specify a target namespace for any links we generate
classmethod InvokeClassMethod(pPageClass As %String, pClass As %String, pMethod As %String, pRetType As %String, pSyncFlag As %Boolean, pHeader As %String, pBody As %String, pSpec As %String = "", pArgs As %String = "", pNamespace As %String = "", pThreadId As %Integer = 0) as %String [ Language = objectscript ]
This method is called from the client when it wants to invoke a class method.
pPageClass is the class name of the page invoking the method.
pClass is the class name.
pMethod is the method name.
pRetType is the client type of the return type (or "").
pHeader is the header section of the serial state.
pBody is the body section of the serial state.
pSpec is the method signature: "L,L,O" (L = Literal, B = Boolean, O = Object).
pArgs is the serialized set of arguments. ($C(4) delimited).
pNamespace is the namespace to run in.
classmethod InvokeInstanceMethod(pPageClass As %String, pObjIndex As %Integer, pMethod As %String, pRetType As %String, pSyncFlag As %Boolean, pHeader As %String, pBody As %String, pSpec As %String = "", pArgs As %String = "", pNamespace As %String = "", pThreadId As %Integer = 0) [ Language = objectscript ]
This method is called from the client when it wants to invoke an instance method for a component. pPageClass is the class name of the page invoking the method.
pObjIndex is the index of *this* object.
pMethod is the method name.
pRetType is the client type of the return type (or "").
pHeader is the header section of the serial state.
pBody is the body section of the serial state.
pSpec is the method signature: "L,L,O" (L = Literal, B = Boolean, O = Object).
pArgs is the serialized set of arguments. ($C(4) delimited).
pNamespace is the namespace to run in.
classmethod OnEndSession() [ Language = objectscript ]
Called when the session is about to be deleted.
classmethod OnPostHTTP(pPageClass As %String) [ Language = objectscript ]
PostHTTP handler shared by all ZEN pages.
classmethod OnPostHyperEvent(pPageClass As %String) as %Boolean [ Language = objectscript ]
PostHyperEvent handler shared by all ZEN pages.
classmethod OnPreHTTP(pPageClass As %String, pClientCache As %Boolean, pAutoNS As %Boolean = 0, pResource As %String = "", pContentType As %String = "") as %Boolean [ Language = objectscript ]
PreHTTP handler shared by all ZEN pages.
classmethod OnPreHyperEvent(pPageClass As %String, pMethod As %String, pAutoNS As %Boolean = 0, pResource As %String = "") as %Boolean [ Language = objectscript ]
PreHyperEvent handler shared by all ZEN pages.
Feedback