%ZEN.Portal.standardPageabstract class %ZEN.Portal.standardPage
This base class provides a standard template for portal pages implemented using Zen.
Set this to the appropriate application class. parameter AUTONS = 1;
If true, auto-switch namespace to whatever $NAMESPACE is passed in. parameter DEFAULTSORTMODE = "name";
If this page has sort options, this is its initial sort mode. parameter DEFAULTVIEWMODE = "columns";
If this page has multiple views, this is its initial display mode. parameter DOMAIN = "%Utility";
Set this to the correct domain. parameter FAVORITEICON = "portal/sysoperate.ico";
SMP favorite icon. parameter HOMEPAGE = "/csp/sys/%25CSP.Portal.Home.zen";
URL of home page (used in links by many pages via homePage.) parameter PAGENAME = "Standard Portal Page";
Name of this page. parameter RECENT = 1;
If true, register visits to this page in the recent list. parameter SHOWNAMESPACE = 1;
If true, show the Namespace dropdown.
Define the title that will be displayed within subclasses property aboutPage as %ZEN.Datatype.string [ InitialExpression = ..Link("_CSP.UI.Portal.About.zen") ];
About page URL property currSortMode as %ZEN.Datatype.string [ InitialExpression = ..#DEFAULTSORTMODE ];
Current sort mode for this page (if applicable). property currStep as %ZEN.Datatype.integer [ InitialExpression = 1 ];
For pages with steps, this is the current step (1-based). property currViewMode as %ZEN.Datatype.string [ InitialExpression = ..#DEFAULTVIEWMODE ];
If this page has "views", this is the current view type. property homePage as %ZEN.Datatype.string [ InitialExpression = ..Link(..#HOMEPAGE,,1)_$select('$data(%response.Context("$NAMESPACE")): "$NAMESPACE="_$zcvt($namespace,"O","URL"), 1: "") ];
Product home page URL. Note that multiple portal pages rely on this being a fully formed link. property limitPopups as %ZEN.Datatype.boolean [ InitialExpression = ##class(%CSP.Portal.Utils).%IsConnectivityPopupDisabled() ];
Set to true to suppress hyperevent error pop-ups in the event of a connectitivity failure. property pageModified as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
True if the contents of this page need to be saved. property searchKey as %ZEN.Datatype.string;
Current search key value (if applicable).
Return the array of links to show in the locator bar. method %OnAfterCreatePage() as %Status
pLink(n)=$LB(caption,link) Sub-class can override to include extra levels.
Decorate the page. method %OnDrawHTMLMeta() as %Status
Ensure that we force Internet Explorer to use its most recent rendering engine. method %OnGetPageName() as %String
Get the (localized) name of the page. This should be implemented in a subclass. method %OnGetProductName() as %String
Get the product name for the page. method %OnGetSmallMenu(Output pMenu)
Get the contents of the small menu in the title area. method %OnGetTitle() as %String
Get the (localized) title string for the page. This should be implemented in a subclass. classmethod %OnUseSoftModals() as %Boolean
Use soft modals for the portal. method %Register() as %Status
Register this visit to the recent items list. method BuildMenu() as %Status
This method rebuilds context menu on the top left corner. classmethod CheckContextLinks(ByRef pLinks) as %Status
Helper method to ensure that the user has sufficient privileges to access the links returned in GetContextLinks(). This is especially important for cases where system administrators have specified custom resources for pages in the portal, as we need to check the custom resources before adding the option to the context menu. method CheckEnterpriseManager() as %Status
This is deprecated and is expected to always return zero. classmethod DoLogout() as %String [ ZenMethod ]
method DrawLocator(pSeed As %String) as %Status
Draw additional content in the locator bar. method DrawRibbon(pSeed As %String) as %Status
Draw the contents of the tool ribbon. This is displayed if a subclass implements the OnGetRibbonInfo callback. final method DrawTitle(pSeed As %String) as %Status
Draw the contents of the title area. Dispatch to application class. classmethod GetCSPURL(link As %String) as %String [ ZenMethod ]
Tranforms the link specified by link into a URL and returns it as a string classmethod GetContextLinks(Output pLinks) as %Status
Define any context links for the page. Sub-class to override. Note that the subclass should call CheckContextLinks() to ensure that the user is actually permitted to access all of the links - the pages may have custom resources defined that would prevent the user from seeing the page. classmethod GetDocPage(pHelpAddress As %String) as %String [ ZenMethod ]
classmethod GetNewURL(pNS As %String, pPage As %String = "%25CSP.Portal.Home.zen") as %String [ ZenMethod ]
Given new namespace, return new URL with new $NAMESPACE. When changing namespace, always go back to Home page classmethod GetQuickLinks(Output pLinks) as %Status
because you don't know if the new namespace has or allows your current page.
Define any quick links for the page method OnDrawRibbon() as %Status
This is called in the middle of rendering the tool ribbon. Subclasses can inject their own content into the ribbon by writing it out in this method. This content is best wrapped within a single td element. It can also consist of multiple td elements. 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
To achieve a fixed position for elements within the ribbon, for a fixed width page you can use a single enclosing td that contains a table and a single tr, with td elements inside that single tr that contain your content for the ribbon.
To achieve a fixed position for elements within the ribbon, for a page whose width varies depending on its contents (thereby stretching the ribbon) you can use multiple td elements to contain your content and then a final td element that is empty and has width 40% (or so) to push your contents towards the left and keep them in their proper locations.
pDisplay is true if the ribbon should be displayed.
pViewIcons is an array describing "view" buttons to display: pViewIcons(n) = $LB(id,help,icon)
pSortOptions is an array describing "sort" options to display: pSortOptions(n) = $LB(id,caption,help)
pSearch is true if a search box is displayed.
pRibbonTitle is a title to display.
pCommands is an array of command buttons to display: pCommands(n) = $LB(id,caption,help,onclick)
Show dialog to switch namespace