InterSystems IRIS Data Platform 2020.4 > Class Reference > %SYS namespace > %CSP.UI.Portal.Template

%CSP.UI.Portal.Template

abstract class %CSP.UI.Portal.Template extends %CSP.Portal.Template

Template for System Management Portal (used by System Operation, System Explorer, System Administration).

Property Inventory

Method Inventory

Parameters

parameter APPLICATION = %CSP.UI.Portal.Application;
Class name of application this page belongs to.
parameter EMSSERVICE;
parameter HELPADDRESS;
Each SMP page should set this link which points to the documentation anchor name.
parameter PAGENAME = System Management Portal Template;
Inherited description: Displayed name of this page.
parameter PARENTPAGE = /csp/sys/%CSP.Portal.Home.zen;
Inherited description: This parameter defines the parent page for this page.
If the name ends in .csp, then the parent is assumed to be an autopage-enabled CSP page.
If the name ends in .cls, then the parent is assumed to be a Zen page.
This is used to automate the construction of the locator bar for this page and to build the index between portal pages and documentation.
The %GetLocatorInfo method is used to get this information.

Properties

property FirstFailed as %String;
Keeps track of the first form field that failed during validation.
Property methods: FirstFailedDisplayToLogical(), FirstFailedGet(), FirstFailedIsValid(), FirstFailedLogicalToDisplay(), FirstFailedLogicalToOdbc(), FirstFailedNormalize(), FirstFailedSet()
property HelpAddress as %ZEN.Datatype.string [ InitialExpression = ..#HELPADDRESS ];
This property overrides %CSP.Portal.Template to use parameter HELPADDRESS that every SMP pages has.
Property methods: HelpAddressDisplayToLogical(), HelpAddressGet(), HelpAddressIsValid(), HelpAddressLogicalToDisplay(), HelpAddressLogicalToOdbc(), HelpAddressNormalize(), HelpAddressSet()
property InvalidParam as %Boolean [ InitialExpression = 0 ];
Set to 1 in %OnAfterCreatePage if a URI parameter is invalid. Used to disable command buttons in onloadHandler().
Property methods: InvalidParamDisplayToLogical(), InvalidParamGet(), InvalidParamIsValid(), InvalidParamLogicalToDisplay(), InvalidParamLogicalToXSD(), InvalidParamNormalize(), InvalidParamSet(), InvalidParamXSDToLogical()
property IsEMSReadOnly as %Boolean [ InitialExpression = ##class(%SYS.EMS).IsReadOnly($classname()) ];
1 if we are on an EMS manager and viewing group data or on a managed instance, 0 otherwise.
Property methods: IsEMSReadOnlyDisplayToLogical(), IsEMSReadOnlyGet(), IsEMSReadOnlyIsValid(), IsEMSReadOnlyLogicalToDisplay(), IsEMSReadOnlyLogicalToXSD(), IsEMSReadOnlyNormalize(), IsEMSReadOnlySet(), IsEMSReadOnlyXSDToLogical()
property IsEditForm as %Boolean [ InitialExpression = 0 ];
If set to 1 then the generic Save and Cancel button will be shown on the ribbon bar.
Property methods: IsEditFormDisplayToLogical(), IsEditFormGet(), IsEditFormIsValid(), IsEditFormLogicalToDisplay(), IsEditFormLogicalToXSD(), IsEditFormNormalize(), IsEditFormSet(), IsEditFormXSDToLogical()
property OnclickArray as %ArrayOfDataTypes;
Keeps track of currently disabled buttons' onclick events.
Property methods: OnclickArrayGet(), OnclickArrayGetObject(), OnclickArrayGetObjectId(), OnclickArrayGetSwizzled(), OnclickArrayIsEmpty(), OnclickArrayIsValid(), OnclickArrayNewObject(), OnclickArraySet(), OnclickArraySetObject(), OnclickArraySetObjectId(), OnclickArrayUnSwizzle()
property PID as %String (ZENURL = "PID");
ID for edit.
Property methods: PIDDisplayToLogical(), PIDGet(), PIDIsValid(), PIDLogicalToDisplay(), PIDLogicalToOdbc(), PIDNormalize(), PIDSet()
property ParentURL as %String [ InitialExpression = ..Link($ZCVT(..#PARENTPAGE,"O","URL")) ];
Parent URL that Cancel and Save should return to
Property methods: ParentURLDisplayToLogical(), ParentURLGet(), ParentURLIsValid(), ParentURLLogicalToDisplay(), ParentURLLogicalToOdbc(), ParentURLNormalize(), ParentURLSet()
property ValidationErrorMsg as %String [ InitialExpression = $$$Text("There was a problem with the form. See the highlighted fields below.") ];
Property methods: ValidationErrorMsgDisplayToLogical(), ValidationErrorMsgGet(), ValidationErrorMsgIsValid(), ValidationErrorMsgLogicalToDisplay(), ValidationErrorMsgLogicalToOdbc(), ValidationErrorMsgNormalize(), ValidationErrorMsgSet()

Methods

classmethod %GetHomePage() as %String [ Language = objectscript ]
This method is used by SMP to return home page. Set home to %session if not null for later use.
Return the array of links to show in the locator bar.
pLink(n)=$LB(caption,link)
Subclasses with extra layers of locator links or other than "Configuration" please override.
method %OnAfterCreatePage() as %Status [ Language = objectscript ]
Be sure to do ##super() when overriding.
method %OnGetTitle() as %String [ Language = objectscript ]
Get the (localized) title string for the page. Subclass can override.
method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) as %Status [ Language = objectscript ]
Get information to display in the ribbon bar.
clientmethod afterSave(result As %ZEN.proxyObject) [ Language = javascript ]
This method can be called by the doSave() function to handle what the ZenMethod of server Save returned. The method expects a proxy object to be passed. result.ok = 1 indicates save is successful. result.Message is a message (not an error message) that should be displayed. result.ok = 0 indicates save has failed. result.ErrorMessage should be displayed. If result.ok = 1 and result.Message is null then the edit form is closed and the ParentURL is displayed.
clientmethod afterValidate() [ Language = javascript ]
This method can be called after validation (where validateRequired has failed) fails. Display standard error message and set focus to the FirstFailed field.
clientmethod doCancel() [ Language = javascript ]
This method resets the modified indicator and return user to the parent page.
clientmethod doModified() [ Language = javascript ]
This method is called when a field is modified. setModified(true) will cause the modified indicator (a star) to show next to the page name.
clientmethod isButtonDisabled(buttonName) [ Language = javascript ]
This method returns true if a ribbon button is disabled; false otherwise.
clientmethod onloadHandler() [ Language = javascript ]
Disable save button for EMS-managed pages. Be sure to use this.invokeSuper('onloadHandler',arguments); when overriding.
clientmethod resetMsg() [ Language = javascript ]
Clear message from idRespond html (usually placed above the editing portion of the page, but could be anywhere).
clientmethod showMsg(msg, isErr) [ Language = javascript ]
Display message in idRespond html (usually placed above the editing portion of the page, but could be anywhere). isErr: if 1 is passed in then the color will be changed to red; If 0 is passed in then the color is changed to #4D3926; If 2 is passed in then the color is changed to green, i.e. success If nothing is passed in, then the color is unchanged. This allows developers to set their own style/class and still be able to use showMsg.
clientmethod trimSpace(zenProp) [ Language = javascript ]
trim space from both outside and inside a string of a passed in zen property and then set back into the zen property
clientmethod validateRequired(ctl, pass, type, checkRange, minVal, maxVal) as %Boolean [ Language = javascript ]
Validate the control value. pass is either "true" or "false" indicating if there is already a field that failed validation. Type is "N" for numeric or "S" for string. If numeric, if checkRange is true, we additionally validate that the number is between minVal and maxVal, inclusive.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

Feedback