Skip to main content

EnsPortal.Template.devPage

abstract class EnsPortal.Template.devPage extends EnsPortal.Template.standardPage, %CSP.Portal.SourceControl.Base

Template for Ensemble pages which need to be able to interact with Source Control hooks. This class extends the basic source control interactions implemented in %CSP.Portal.SourceControl.Base, which should be the primary reference for implementing pages that need to interact with source control hooks.

Property Inventory

Method Inventory

Parameters

parameter MANAGERDIALOG = EnsPortal.Dialog.SourceControlManager.zen;
Inherited description: Page to use for managing popups requested by the source control framework.
parameter OUTPUTDIALOG = EnsPortal.Dialog.SourceControlOutput.zen;
Inherited description: Page to use for displaying output from the server.

Properties

property msgDocReadOnly as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("This document is read only") ];
Property methods: msgDocReadOnlyDisplayToLogical(), msgDocReadOnlyGet(), msgDocReadOnlyIsValid(), msgDocReadOnlyLogicalToDisplay(), msgDocReadOnlyLogicalToOdbc(), msgDocReadOnlyNormalize(), msgDocReadOnlySet()
property studioMode as %ZEN.Datatype.boolean (ZENURL = "STUDIO");
Property methods: studioModeDisplayToLogical(), studioModeGet(), studioModeIsValid(), studioModeLogicalToDisplay(), studioModeLogicalToOdbc(), studioModeLogicalToXSD(), studioModeNormalize(), studioModeSet(), studioModeXSDToLogical()
property tipCSVWizard as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create a new document from a sample") ];
Property methods: tipCSVWizardDisplayToLogical(), tipCSVWizardGet(), tipCSVWizardIsValid(), tipCSVWizardLogicalToDisplay(), tipCSVWizardLogicalToOdbc(), tipCSVWizardNormalize(), tipCSVWizardSet()
property tipCompile as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Compile this document into executable code") ];
Property methods: tipCompileDisplayToLogical(), tipCompileGet(), tipCompileIsValid(), tipCompileLogicalToDisplay(), tipCompileLogicalToOdbc(), tipCompileNormalize(), tipCompileSet()
property tipContractAll as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Contract the diagram") ];
Property methods: tipContractAllDisplayToLogical(), tipContractAllGet(), tipContractAllIsValid(), tipContractAllLogicalToDisplay(), tipContractAllLogicalToOdbc(), tipContractAllNormalize(), tipContractAllSet()
property tipDelete as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Delete the current document") ];
Property methods: tipDeleteDisplayToLogical(), tipDeleteGet(), tipDeleteIsValid(), tipDeleteLogicalToDisplay(), tipDeleteLogicalToOdbc(), tipDeleteNormalize(), tipDeleteSet()
property tipExpandAll as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Expand the diagram") ];
Property methods: tipExpandAllDisplayToLogical(), tipExpandAllGet(), tipExpandAllIsValid(), tipExpandAllLogicalToDisplay(), tipExpandAllLogicalToOdbc(), tipExpandAllNormalize(), tipExpandAllSet()
property tipExport as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Export the current document to a file") ];
Property methods: tipExportDisplayToLogical(), tipExportGet(), tipExportIsValid(), tipExportLogicalToDisplay(), tipExportLogicalToOdbc(), tipExportNormalize(), tipExportSet()
property tipGen as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this document and generate classes") ];
Property methods: tipGenDisplayToLogical(), tipGenGet(), tipGenIsValid(), tipGenLogicalToDisplay(), tipGenLogicalToOdbc(), tipGenNormalize(), tipGenSet()
property tipImport as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Import a document from a file") ];
Property methods: tipImportDisplayToLogical(), tipImportGet(), tipImportIsValid(), tipImportLogicalToDisplay(), tipImportLogicalToOdbc(), tipImportNormalize(), tipImportSet()
property tipImportLegacy as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Import a document from a file that was exported in legacy format") ];
Property methods: tipImportLegacyDisplayToLogical(), tipImportLegacyGet(), tipImportLegacyIsValid(), tipImportLegacyLogicalToDisplay(), tipImportLegacyLogicalToOdbc(), tipImportLegacyNormalize(), tipImportLegacySet()
property tipNew as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create a new document") ];
Property methods: tipNewDisplayToLogical(), tipNewGet(), tipNewIsValid(), tipNewLogicalToDisplay(), tipNewLogicalToOdbc(), tipNewNormalize(), tipNewSet()
property tipOpen as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Load an existing document") ];
Property methods: tipOpenDisplayToLogical(), tipOpenGet(), tipOpenIsValid(), tipOpenLogicalToDisplay(), tipOpenLogicalToOdbc(), tipOpenNormalize(), tipOpenSet()
property tipSave as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this document") ];
Property methods: tipSaveDisplayToLogical(), tipSaveGet(), tipSaveIsValid(), tipSaveLogicalToDisplay(), tipSaveLogicalToOdbc(), tipSaveNormalize(), tipSaveSet()
property tipSaveAs as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this document with a new name") ];
Property methods: tipSaveAsDisplayToLogical(), tipSaveAsGet(), tipSaveAsIsValid(), tipSaveAsLogicalToDisplay(), tipSaveAsLogicalToOdbc(), tipSaveAsNormalize(), tipSaveAsSet()

Methods

method %OnAfterCreatePage() as %Status
Determine whether source control is enabled and ensure we don't write out the session cookie if we are running in Studio mode.
method %OnDrawHTMLHead() as %Status
Inherited description: Add the EnsException error handling on the client.
method %OnDrawHTMLMeta() as %Status
Ensure that we force Internet Explorer to use its most recent rendering engine, except if we are in Studio, in which case we don't want IE10 and IE11 as we have issues with the way it present XML to Studio.
classmethod GetHyperEventResources(pMethod As %String = "") as %String
Callback to return a list of resources required for a specific HyperEvent. The user must have sufficient privileges on one of the resource/permission pairs to be permitted to execute the hyperevent. An empty string implies the user already has sufficient privileges for the ZenMethod specified in pMethod.
method IsDocReadOnly() as %Boolean [ ZenMethod ]
method OnDrawRibbon() as %Status
Use %DrawSourceControlCommands()() to render the extra source control options in the tool ribbon.
classmethod OnPreHyperEvent(class As %String, method As %String) as %Status
Avoid writing out the session cookie if we are in a Studio session.
clientmethod canUserModify(saveAs) [ Language = javascript ]
Test if the user has write privilege.
clientmethod checkStudioHyperEvents() [ Language = javascript ]
clientmethod escapeCData(text) [ Language = javascript ]
clientmethod fixDocumentTitle() [ Language = javascript ]
clientmethod getIsReadOnly() as %Boolean [ Language = javascript ]
clientmethod grayOutButtons() [ Language = javascript ]
Gray out ribbon buttons 'Save', 'Save As', 'Compile', and 'Delete'. Invoked in case of read-only mode.
clientmethod onloadHandler() [ Language = javascript ]
Add check to ensure that we correctly load documents on the client when source control hooks are in use. Also set up a timer to ensure we don't hit timeouts while editing documents in Studio, as well as When in Studio mode, also detect whether we are running IE10, as we need to save documents differently if that is the case.
clientmethod raiseEvent(type, value) [ Language = javascript ]
Note that special handling is required for the LOADCOMPLETE event. We need to ensure that Studio gets the LOADCOMPLETE event, as well as updating the document title later to ensure the correct reload behaviour. The timeout is extra-long for IE9 and up because the main page's onload() sequence may be triggered before the SVG is fully loaded, so we need to build in enough time to let the SVG load before we update the title.
clientmethod setModified(flag) [ Language = javascript ]
Set the modified flag for the page.
clientmethod setReadOnly(readOnly) [ Language = javascript ]
Set readOnly to the value of readOnly. Subclasses MUST implement this method to update the controls on the page so that the page's behaviour actually matches the value of the readOnly flag.
clientmethod setResultsDiv(type, value, usingDOMElement) [ Language = javascript ]
Set data into the results element for Studio. Note that usingDOMElement should only be true under IE10.
clientmethod toggleReadOnly() [ Language = javascript ]
clientmethod toggleSVGElements(show) [ Language = javascript ]
Helper method to hide or show SVG elements when opening a popup. This is primarily to ensure that we don't run into issues with IE and the Adobe plugin when the popup window also uses SVG.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab