Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [EnsPortal] >  [Template] >  [viewerPage]
Private  Storage   

abstract class EnsPortal.Template.viewerPage extends EnsPortal.Template.standardPage

Base class for viewer-style pages.

These are pages that let the user view a list (such as messages or contents of queues) and select search criteria. Subclasses must override and provide items as follows. See the EnsPortal.EventLog class for an example; there are also others.

Subclasses must provide a searchPane, resultsPane, and detailsPane. The resultsPane should contain a and the detailsPane should contain an with a callback. Subclass must not provide a contentPane.

Note the parameters that identify the id values for the results table, page size counter, and page number counter field. These string values must match the corresponding actual id values for these components in the searchPane and resultsPane. You can set new values for the ids in your subclass if you like. Be sure to set a detailsWidth value, which will interplay with the width of the HTML contents of the detailsPane. It is a good idea to put static widths on the HTML contents of the detailsPane and have them scroll in x and y. See the EnsPortal.EventLog class for an example; there are also others.

The detailsWidth and the width of the HTML contents of the detailsPane will interact with what width you give to the menuPane style which affects the searchPane width.

In the resultsPane, there must be a . The must provide onselectrow="zenPage.selectItem(zenThis)" and onmouseoverClass="tpMouseOver". The should also provide a tableName, even if that doesn't happen until %OnAfterCreatePage, as in EnsPortal.BPInstances.

The subclass must provide an onSelectItem() method. onSelectItem() gets called automatically by the superclass method selectItem().

Subclasses should use getResultsTable() to get the handle of the results table object with no row selection made.

The main

inside the searchPane must have the id value "searchForm".

The search method that gets invoked upon user actions must be called doSearch(). The doSearch() method itself is provided in the superclass.

Subclass should implement an onAfterPageChange() method that does any actions that the page should do each time the display changes (that is, after each search). For example, a subclass might want to force certain expandos to remain open to permit easy access to the fields found there. There is no need to worry about updating the page number, however. That happens automatically.

Subclass should implement an onSearchHandler() method that doSearch() will invoke automatically. Its purpose is to get all the criteria for the search from the form fields. See the EnsPortal.EventLog class for an example; there are also others.

Subclass should implement a GetColumnsAndFrom(timeFormat) method to insert the table name and correctly formatted time string, as well as all desired columns. See examples.

The page size field should have value="#(%page.pageSize)#". The page number field should have value="#(%page.currentPage)#".

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
8 23 40


Summary

This is a Zen Page class. It belongs to the application EnsPortal.Application.

Properties
%condition %import %includeFiles %page
%resource HelpAddress ISREADONLY LocatorHeader
ParentURL StdTitle aboutPage align
aux backgroundTimerInterval canEdit cellAlign
cellSize cellStyle cellVAlign children
composite contactPage containerStyle cssLevel
currSortMode currStep currViewMode currentPage
currentPageStart detailsHidden detailsWidth disabled
dragAndDrop dragEnabled dropEnabled enableAutoRefresh
enclosingClass enclosingStyle error groupClass
groupStyle height hidden hideDetailsMsg
hideSearchMsg hint hintClass hintStyle
home homePage id index
isFirstPage isLastPage keepAliveInterval label
labelClass labelDisabledClass labelPosition labelStyle
layout lblDetails lblTitle limitPopups
msgCloseDetail msgNotPermitted name onafterdrag
onbeforedrag onclick ondrag ondrop
onhide onrefresh onshow onupdate
pageId pageModified pageNumberId pageSizeId
parent queryAtEnd resultsTableId searchCriteria
searchJob searchKey searchQuery selectedId
showDetailsMsg showLabel showSearchMsg slice
tablePaneUsesSQLAttrib tempPortalNode title tuple
useSVG useSoftModals valign visible
width window zenPersistentPopup

Methods
%AddCSPShareHyperevents %AddChild %AddChildAfter %AddChildBefore
%AddComponent %AddEnsExceptionHandler %AddImportedComponents %AddLocatorLinks
%AddToSaveSet %ApplyURLParms %Attr %BindExport
%ClassIsLatestVersion %ClassName %ConstructClone %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %DrawAutoLogout %DrawClassDefinitions
%DrawComponentHTML %DrawHTML %DrawHTMLPage %DrawJSStrings
%DrawObjectDefinitions %EnclosingDivId %EndBackgroundMethod %EndScript
%Eval %EvalC %Extends %ForceClientRender
%GetChildIndex %GetComponent %GetComponentById %GetComponentByName
%GetEventHandlers %GetHomePage %GetHomeParam %GetLinks
%GetLocatorLinks %GetPageName %GetParameter %GetProductName
%GetRootLink %GetValueById %GetValueByName %GetXMLName
%IsA %IsModified %Link %LinkCSS
%LinkScript %MakeId %New %NormalizeObject
%ObjectModified %OnAddToPageAfter %OnAddToPageBefore %OnAfterCreatePage
%OnBeforeCreatePage %OnCreateApplication %OnCreatePage %OnDetermineCSSLevel
%OnDrawEnclosingDiv %OnDrawHTMLBody %OnDrawHTMLHead %OnDrawHTMLMeta
%OnDrawObjectProperties %OnFinishBackgroundTask %OnGetPageName %OnGetProductName
%OnGetSmallMenu %OnGetTableLinkMenu %OnGetTitle %OnMonitorBackgroundTask
%OnMutateChildren %OnObjectSynch %OnPreHTTP %OnSubmit
%OnUseSoftModals %OnZENDeserialize %OriginalNamespace %PackageName
%QuoteValue %QuoteValueL10N %Register %RemoveChild
%RemoveChildren %RemoveComponent %RemoveFromSaveSet %RunBackgroundMethod
%Self %SerializeObject %SetBackgroundMethodStatus %SetErrorById
%SetErrorByName %SetModified %SetValueById %SetValueByName
%SetValuesByName %StartScript %ValidateObject %ZENVersion
BuildMenu CheckAllBlanks CheckContextLinks CheckEnterpriseManager
ConvertParameter Decrypt DoLogout DrawDetailsContent
DrawLocator DrawRibbon DrawTitle Encrypt
EscapeHTML EscapeURL EvalResult GetCSPURL
GetColumnsAndFrom GetContextLinks GetDocURL GetHomePage
GetHyperEventResources GetNewURL GetQuickLinks GetRemoteSearchJob
HyperEventCall HyperEventHead Include InsertHiddenField
InsertHiddenFields IsPrivate JavaInstalled Link
OnDrawRibbon OnGetRibbonInfo OnHTTPHeader OnPage
OnPageError OnPostHTTP OnPostHyperEvent OnPreHTTP
OnPreHyperEvent Page PrepareCancel QuoteJS
RegisterRecent RemoveTempData ResetQuery RewriteURL
ShowError SignalCancel SimpleKeepAlive StartTimer
StopTimer ThrowError UnescapeHTML UnescapeURL
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType
addChild addChildAfter addChildBefore addPopupSuffix
adjustExpanderText arrowClick cancelPopup cancelSearch
changePassword changeURLNamespace checkEdit childrenMutated
clientKeepAlive correctIELayering createComponent createComponentNS
createTimeWarning deleteComponent disableCommandButton displayCountDown
doSearch dragFinishHandler dragHandler dragNotifyHandler
dragStartHandler dropHandler dropStartHandler enableCommandButton
endModal executeSearch exposeComponent findElement
fireOnResizeEvent fireOnUnloadEvent fireOnUpdateEvent firePopupAction
getChildIndex getComponent getComponentById getContentAreaHeight
getEnclosingDiv getHidden getHintElement getLabelElement
getNextData getOpener getPageTitle getProperty
getResultsTable getSearchForm getSettings getTitleAreaHeight
getType goHome goMenu gotoNamespace
gotoPage hideCommandButton hideTimeoutWarning hideWarnContinue
inResizeLoop indicateIfCancelled initPopupSuffix invokeSuper
isOfType launchPopupWindow logout makeId
manualKeepAlive navigate onAfterPageChange onAfterSearch
onChangeResultsPage onCreate onDelete onDisplayHandler
onEndModalHandler onEnsException onPopupAction onRefreshContents
onSearchHandler onSelectItem onSerialize onServerMethodCall
onServerMethodError onServerMethodReturn onStartModalHandler onToggleDetails
onToggleSearch ondisabledHandler onhandleAutoLogoutWarn onkeydownHandler
onkeyupHandler onlayoutHandler onloadHandler onlogoutHandler
onoverlayHandler onresizeHandler onunloadHandler onupdateHandler
popupActionHandler refreshContents removeChild removePopupSuffix
render renderContents renderSVG searchBlur
searchBoxHandler searchFocus searchKeyDown searchKeyPress
selectItem setComponentId setConnectivityStatusMsg setHidden
setModified setOverlayMode setPageTitle setProperty
setPropertyAll setSortMode setSortModeHandler setTraceOption
setViewMode setViewModeHandler setWarnInnerHTML showAbout
showCommandButton showContact showDocumentation showHelp
showQuery showTimeoutWarning startKeepAlive startModal
startProgressBar stopKeepAlive stopProgressBar switchNamespace
toggleCancelState toggleDetails toggleSearch toggleSearchState
updateNavigationButtons updatePageData updatePageNumber updatePageSize
warnclickListener

Subclasses
Ens.Enterprise.Portal.MonitorStatus EnsPortal.BPInstances EnsPortal.EventLog
EnsPortal.LegacyRuleLog EnsPortal.ManagedAlertViewer EnsPortal.PEXComponents
EnsPortal.ProductionMonitor EnsPortal.RuleLog EnsPortal.Template.filteredViewer

Parameters

• parameter CANCANCELSEARCH = 0;
Indicate if can cancel search.
• parameter DOMAIN = "Ensemble";
Set this to the correct domain.
• parameter PAGENAME = "Viewer Page";
Name of this page.
• parameter SETUPTEMPPORTALNODE = 0;
Indicate if ought to create tempPortalNode when page created. Used by Cancel feature for example.
• parameter SHOWDETAILSTOGGLE = 1;
Indicate whether toggle button for details pane should be displayed.
• parameter SHOWSEARCHTOGGLE = 1;
Indicate whether toggle button for search pane should be displayed.
• parameter SHOWVALUECOLUMN = 1;
Indicate whether value column should be displayed. This can be overridden by subclasses.
• parameter VALUECOLUMNNO = 1;
Number of column in query that supplies ID values. This can be overridden by subclasses.

Properties

• property currentPage as %ZEN.Datatype.integer [ InitialExpression = 1 ];
Number of the current page being viewed
• property currentPageStart as %ZEN.Datatype.integer [ InitialExpression = 0 ];
Row value indicating start of current "page" of results
• property detailsHidden as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Flag to indicate whether the detailsPanel is currently hidden.
• property detailsWidth as %ZEN.Datatype.integer(MAXVAL=80,MINVAL=5) [ InitialExpression = 30 ];
Value to indicate the percentage of the horizontal screen which should be devoted to the details panel (if it is visible). This is exposed as a client-side property for the layout code to use the value.
• property hideDetailsMsg as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Hide Details") ];
Hovertext used for detailsExpander Arrow
• property hideSearchMsg as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Hide Search") ];
Hovertext used for searchExpander Arrow
• property isFirstPage as %ZEN.Datatype.boolean;
Flag to indicate whether this is the first page of results. The flag is updated on the client after searches have completed.
• property isLastPage as %ZEN.Datatype.boolean;
Flag to indicate whether this is the last page of results. The flag is updated on the client after searches have completed.
• property lblDetails as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Details") ];
• property msgCloseDetail as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Close this detail box.") ];
• property pageId as %ZEN.Datatype.string;
Page identifier used with temp global for cancelling search
• property pageNumberId as %ZEN.Datatype.id [ InitialExpression = "pageNumber" ];
Id of the page number field
• property pageSizeId as %ZEN.Datatype.id [ InitialExpression = "pageSize" ];
Id of the page size field
• property queryAtEnd as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Flag to indicate whether the query has no more rows
• property resultsTableId as %ZEN.Datatype.id [ InitialExpression = "resultsTable" ];
Id of the results tablePane
• property searchCriteria as %ZEN.proxyObject;
Search criteria from the client.
This is a proxy object whose contents are filled in from the search form by the doSearch method. It is expected that the search query will use this information to determine what results to display.
• property searchJob as %ZEN.Datatype.string;
This is the $Job of the process running the search. It is used by the Cancel search process. If it is -1 then it indicates a Cancel has been issued. It is reset to '' when Search finishes.
• property searchQuery as %ZEN.Datatype.string;
Diagnostic property. This contains the most recent query.
• property selectedId as %ZEN.Datatype.string;
Id of selected item in results table.
• property showDetailsMsg as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Show Details") ];
Hovertext used for detailsExpander Arrow
• property showSearchMsg as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Show Search") ];
Hovertext used for searchExpander Arrow
• property tablePaneUsesSQLAttrib as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Flag to indicate whether the tablePane uses the 'sql' attribute to construct queries during normal query execution. This flag determines whether the value of the 'sql' property should be set to '' (empty string) on the client after changing between pages. Initialize (or set) this property to 1 (on the server) or true (on the client) to avoid having the value reset on the client. Under normal operation the property is cleared after each page change occurs.
• property tempPortalNode as %ZEN.Datatype.string;
This is the temp global used for cancelling search

Methods

• method %OnAfterCreatePage() as %Status
Show/hide the toggle buttons
• method %OnGetTableLinkMenu(Output pMenu)
Get the contents of the link menu in the table.
Sub-class may override to add more links.
If more links are added, sub-class is to provide client methods for additional links.
• method %OnGetTitle() as %String
Get the (localized) title string for the page. This should be implemented in a subclass.
• method DrawDetailsContent(pID As %String) as %Status
Write out details for the given item. This should be overridden within the subclass.
• method GetColumnsAndFrom(timeFormat As %String) as %String
For tablePanes which require a constructed SQL query when paging, this callback supplies the columns and FROM portions of the query.
• method GetRemoteSearchJob(pRemoveTempData As %Boolean = 0) as %String [ ZenMethod ]
• method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String) as %Status
Get information to display in the ribbon bar.
• method PrepareCancel() as %String [ ZenMethod ]
Record in temp Portal node this pid so that client can send cancel/interrupt
• method RemoveTempData() as %Integer [ ZenMethod ]
Remove Event.
• method ResetQuery(next As %Boolean, pageSize As %String, timeFormat As %String, wherePlus As %String, idVal As %String, outer As %String) as %String [ ZenMethod ]
Helper method to construct a query on the server when paging. This method should be invoked from onChangeResultsPage() for tablePanes which use the whereClause, orderbyClause and columns properties to construct queries. next is true for Next, false for Previous; pageSize is the page size; wherePlus gives the ID < or ID > string; idVal gives the id value to compare with ID, outer is either ASC or DESC depending on the current display order.
• method SignalCancel(pSendStop As %Boolean = 1, pSendInterrupt As %Boolean = 1) as %Integer [ ZenMethod ]
Signal query to cancel. Use Event signal first and then try Interrupt.
• method adjustExpanderText(type) [ Language = javascript ]
Helper method invoked during layout to ensure the correct hovertext is displayed for the show/hide arrow boxes
• method cancelSearch() [ Language = javascript ]
Client side method to invoke the Cancel.
• method doSearch() [ Language = javascript ]
Invoke a search using values from the search form.
• method executeSearch() [ Language = javascript ]
Actually request the search on the server.
• method getContentAreaHeight() [ Language = javascript ]
Helper method to return the height we think the content area of the viewer should have.
• method getNextData(next) [ Language = javascript ]
User clicked the Next Page or Previous Page button
• method getResultsTable() [ Language = javascript ]
Return the search results object.
• method getSearchForm() [ Language = javascript ]
Return the search form object.
• method indicateIfCancelled() [ Language = javascript ]
Change table output to Cancelled if we cancelled
• method onAfterPageChange() [ Language = javascript ]
Callback invoked after the next/previous page has been loaded.
• method onAfterSearch() [ Language = javascript ]
Callback for subclasses to take action when a search completes. Subclasses should ensure that they either implement behaviour to handle page navigation behaviour OR call invokeSuper(). Subclasses should also ensure that zenPage.toggleSearchState(false) is called. Pass false as second parameter if calling from error handler.
• method onChangeResultsPage(next, pageSize, currentPage) [ Language = javascript ]
Callback to set up the resultset/query for paging.
• method onEnsException() [ Language = javascript ]
• method onSearchHandler() [ Language = javascript ]
Notify subclass that a search is being executed.
• method onSelectItem() [ Language = javascript ]
Notify subclass that row was selected.
• method onServerMethodError(err, errObject) [ Language = javascript ]
Override this method to allow us to report gateway timeouts in a user-friendly manner.
• method onToggleDetails() [ Language = javascript ]
Callback for subclasses to take action when the details pane is toggled. The detailsHidden property should be used to determine whether the details pane is currently hidden.
• method onToggleSearch() [ Language = javascript ]
Callback for subclasses to take action when the search pane is toggled. The searchHidden property should be used to determine whether the search pane is currently hidden.
• method onlayoutHandler(load) [ Language = javascript ]
Adjust sizes of components on the page.
• method selectItem(row) [ Language = javascript ]
Select the given item (row in table) and let the subclass take any necessary actions like updating the details pane.
• method showQuery() [ Language = javascript ]
Show text of most recent query.
• method toggleCancelState(inSearch, canCallServer) [ Language = javascript ]
When the Cancel button is enabled setup the cancel event. When the Cancel button is disabled handle multiple pages and change table output to say Cancelled if the search was cancelled.
• method toggleDetails() [ Language = javascript ]
Expands and contracts the details pane, and ensures that the results pane is expanded to fill in the space.
• method toggleSearch() [ Language = javascript ]
Expands and contracts the search pane, and ensures that the results pane is expanded to fill in the space.
• method toggleSearchState(inSearch, canCallServer) [ Language = javascript ]
• method updateNavigationButtons() [ Language = javascript ]
Ensure that the "Next" and "Previous" buttons behave correctly based on the data returned from the current search.
• method updatePageData() [ Language = javascript ]
Helper method to record the first and last ID values for the current page.
• method updatePageNumber() [ Language = javascript ]
Helper method to update the component which displays the current page number
• method updatePageSize() [ Language = javascript ]
Bring the maxRows property of the tablePane into line with the current page size.


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.