Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%ZEN] >  [Component] >  [modalGroup]
Private  Storage   

deprecatedclass %ZEN.Component.modalGroup extends group

Specialized group for creating a set of modal components displayed within a page.
To display a modalGroup, use the modalGroup's show method. Use the zenPage object's endModal to remove the modalGroup.
You can define the contents of a modalGroup in three different ways:

  1. Static mode: The modalGroup is defined within a page definition in the same way as any other group. The contents of the group will be hidden until the show is called.
  2. Dynamic mode: The application creates a modalGroup dynamically (using the page's createComponent method), adds components to it, and displays it with the show method.
  3. Built-in mode: The application uses the show method to display one of the built-in groups: "msgBox" or "calendar".

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 8 26


Summary

Properties
%condition %import %includeFiles %page
%resource align aux cellAlign
cellSize cellStyle cellVAlign children
composite containerStyle disabled dragEnabled
dropEnabled enclosingClass enclosingStyle error
groupClass groupStyle groupTitle groupType
height hidden hint hintClass
hintStyle id index label
labelClass labelDisabledClass labelPosition labelStyle
layout name okCaption onaction
onafterdrag onbeforedrag onclick ondrag
ondrop onhide onhideGroup onrefresh
onshow onshowGroup onupdate parent
seed showLabel slice title
tuple valign value visible
width window

Methods
%AddChild %AddChildAfter %AddChildBefore %AddToSaveSet
%Attr %BindExport %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%DrawComponentHTML %DrawHTML %DrawJSStrings %EnclosingDivId
%Eval %EvalC %Extends %ForceClientRender
%GetChildIndex %GetEventHandlers %GetParameter %GetXMLName
%IsA %IsModified %MakeId %New
%NormalizeObject %ObjectModified %OnAddToPageAfter %OnAddToPageBefore
%OnDrawEnclosingDiv %OnDrawObjectProperties %OnMutateChildren %OnObjectSynch
%OnZENDeserialize %OriginalNamespace %PackageName %QuoteValue
%QuoteValueL10N %RemoveChild %RemoveChildren %RemoveFromSaveSet
%Self %SerializeObject %SetModified %ValidateObject
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType
actionHandler addChild addChildAfter addChildBefore
childrenMutated constrainDragX constrainDragY dragFinishHandler
dragHandler dragNotifyHandler dragStartHandler dropHandler
dropStartHandler endDrag exposeComponent findElement
fireOnUpdateEvent getChildIndex getEnclosingDiv getFloatingDiv
getHidden getHintElement getLabelElement getModalBodyContent
getProperty getSettings getType getValue
hideGroup invokeSuper isOfType makeId
mousedownHandler mousemoveHandler mouseupHandler onCanEndModalHandler
onCreate onDelete onDialogFrameLoad onDisplayHandler
onEndModalHandler onPopupAction onRefreshContents onSerialize
onStartModalHandler ondisabledHandler onloadHandler onunloadHandler
onupdateHandler refreshContents removeChild render
renderContents renderSVG setHidden setOverlayMode
setProperty setPropertyAll show startProgressBar
startZLMDrag startZLMMove startZLMResize stopProgressBar
toggleDragMouseTrap updateFrameSize updateTitle


Parameters

• parameter DEFAULTHIDDEN = 1;
Subclasses can set this to change default hidden property for a component.
• parameter DEFAULTLAYOUT = "vertical";
Subclasses can set this to change default layout for a group.

Properties

• property groupTitle as %ZEN.Datatype.caption;
Title to display at top of modal group. This is set dynamically by the show method. For static modalGroups, it can be set in the original page definition.
• property groupType as %ZEN.Datatype.string(VALUELIST=",msgBox,calendar,dialog",XMLPROJECTION="none",ZENSETTING=0);
If set, this indicates that a pre-defined modalGroup of the specified type should be displayed. This is set by the show method; applications should not set this.
• property okCaption as %ZEN.Datatype.caption [ InitialExpression = $$$Text("OK","%ZEN") ];
Localizable "OK" caption displayed in OK button for a message box.
• property onaction as %ZEN.Datatype.eventHandler;
onaction event handler: client code to run when user takes action with pre-defined modalGroup.
• property onhideGroup as %ZEN.Datatype.eventHandler;
onhideGroup event handler: This event is fired when the modalGroup is hidden.
• property onshowGroup as %ZEN.Datatype.eventHandler;
onshowGroup event handler: This event is fired when the modalGroup is made visible.
• property seed as %ZEN.Datatype.string;
Optional. User-defined seed value. This is an optional parameter that is passed on to the onaction event handler.
• property value as %ZEN.Datatype.string(XMLPROJECTION="none",ZENSETTING=0);
This is used to hold a value for the modalGroup.
This is set by the show method; applications should not set this.

Methods

• method actionHandler() [ Language = javascript ]
This method handles user actions within a pre-defined modalGroup.
• method constrainDragX(engine, wrapper, intendedX) [ Language = javascript ]
Limit the x-axis changes to the current screen size.
• method constrainDragY(engine, wrapper, intendedY) [ Language = javascript ]
Limit the y-axis changes to the current screen size.
• method endDrag(engine, wrapper) [ Language = javascript ]
Callback from the ZLM drag which is used to clean up.
• method getFloatingDiv() [ Language = javascript ]
Return the HTML element used to display this modal group
• method getModalBodyContent(update) [ Language = javascript ]
Helper method to get the content for static modalGroups. If the enclosing div has content, that content is returned, and the enclosing div's content is cleared. If update is true AND the modalBody element for this group exists (i.e. the group has been displayed), then the modalBody's content is updated to the new value.
• final method getValue() as %String [ Language = javascript ]
Client-side method to return the value associated with this group.
• method hideGroup() [ Language = javascript ]
Hide the group.
• method mousedownHandler(evt) [ Language = javascript ]
mousedownHandler: handles start of move operation
• method mousemoveHandler(evt) [ Language = javascript ]
mousemoveHandler: handles move operation
• method mouseupHandler(evt) [ Language = javascript ]
mouseupHandler: handles end of move operation
• method onCanEndModalHandler() [ Language = javascript ]
Don't allow the dialog to be closed unless the user explicitly does something to close the popup or fire a valid action.
• method onDelete() [ Language = javascript ]
Ensure that we remove the floating div when the component is deleted.
• method onDialogFrameLoad(contentWindow) [ Language = javascript ]
• method onEndModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to stop being modal.
• method onRefreshContents() [ Language = javascript ]
Make sure that we correctly track the HTML for static modal groups.
• method onStartModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to become modal.
• method show(title, type, value, top, left, wid, hgt, parms) [ Language = javascript ]
Make this group visible with modal behavior.
title is the optional title to display for the group. For a static group, the application-defined value of groupTitle is used if title is not supplied.
type is the optional type of modalGroup to display. This can be:
  • "msgBox"-display the built-in message box.
  • "calendar"-display the built-in calendar box.
  • "dynamic"-display a dynamically created modalGroup.
  • "static"-display a modalGroup that has been defined as part of the page.
  • "dialog"-display the page with the URL supplied in value in an iframe.
If omitted, then the type will be "static" if the modalGroup has been defined within the page object otherwise "dynamic".
value is an optional value to display when a built-in modalGroup is used.
top,left,wid, and hgt are optional position and dimensions to use for the modalGroup.
parms is an optional object containing a set of additional characteristics passed on to the modalGroup (as a set of name/value pairs). Basically this is a way to pass additional parameters to the popup calendar.
• method startZLMDrag(evt) [ Language = javascript ]
Start ZLM drag once this._dragData has been set up.
• method startZLMMove(evt) [ Language = javascript ]
Start the ZLM drag-based move operation.
• method startZLMResize(evt) [ Language = javascript ]
Start the ZLM drag-based resize operation.
• method toggleDragMouseTrap(show) [ Language = javascript ]
Toggle "visibility" of dragMouseTrap. The trap should be completely transparent but allows the component to trap mouse events reliably during drag operations.
• method updateFrameSize(width, height) [ Language = javascript ]
• method updateTitle(newTitle) [ Language = javascript ]


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