class %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:
- 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.
- 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.
- Built-in mode: The application uses the show method
to display one of the built-in groups: "msgBox" or "calendar".
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.
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.
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
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 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 ]