class %ZEN.Component.expando
extends group
Specialized group that provides the ability to show or hide
its children.
The framed property controls the appearance
of the group. If false, then a caption is displayed at the top
of the group with a expando icon. Clicking on the icon will expand
or contract the group. If framed is true,
then a border is drawn around the entire group and the caption is
displayed within a more formal title box.
This type of component is also known as a "disclosure" within some
user interface systems.
parameter DEFAULTGROUPCLASS = "expandoTable";
Subclasses can set this to change default css class for a group.
parameter DEFAULTLAYOUT = "vertical";
Subclasses can set this to change default layout for a group.
parameter IMAGECONTRACTED = "images/disclosure-contracted.gif";
Default url of image used for contracted expando node.
parameter IMAGEEXPANDED = "images/disclosure-expanded.gif";
Default url of image used for expanded expando node.
property OnDrawContent
as %ZEN.Datatype.delegator(FORMALSPEC="expando:%ZEN.Component.expando",RETURNTYPE="%Status");
Optional.
Name of Server-side callback method that provides additional HTML content
for this component.
If defined, this callback is invoked on the server when this
component is drawn. It provides HTML content by using &html or
by using the WRITE command.
This must be the name of a server-only method in the page
class that contains this view component.
property animate
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true (default is false), then animate the appearance
and disappearance of the group contents.
property caption
as %ZEN.Datatype.caption(ZENEXPRESSION=1);
Value to display for expando node.
This text is not automatically HTML escaped.
property childIndent
as %ZEN.Datatype.length;
Specifies amount child nodes should be indented.
property expanded
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
Indicates whether this expando node is expanded (children visible)
or contracted (children not visible).
property framed
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true (default is false), then display a solid
title area and frame around the contents of this group.
property imageContracted
as %ZEN.Datatype.uri [ InitialExpression = ..#IMAGECONTRACTED ];
url of image used for contracted expando node.
property imageExpanded
as %ZEN.Datatype.uri [ InitialExpression = ..#IMAGEEXPANDED ];
url of image used for expanded expando node.
property oncontract
as %ZEN.Datatype.eventHandler;
oncontract event handler:
If defined, this event is fired just
before the children of this expando are hidden.
property onexpand
as %ZEN.Datatype.eventHandler;
onexpand event handler:
If defined, this event is fired just
before the children of this expando are made visible.
property remember
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, remember most recent expanded state in a session cookie.
method %DrawContent()
as %Status
Invoke user method to provide additional contents for this
component.
method %DrawHTML()
Static HTML display method: draw the BODY of this component
as HTML.
Subclasses implement this in order to render the static HTML
contents of a component.
method %OnDrawTitleOptions()
This callback, if defined, provides a way to add
content to the right side of the title bar when the
expando is in framed mode.
Any HTML written by this method will be injected into
the title bar.
This is expected to be implemented in a subclass.
method getExpanded(tuple)
[ Language = javascript ]
Returns the current expanded state of this expando node.
tuple, if supplied, is the current tuple number
for cases when this expando is used within a repeating group.
method onloadHandler()
[ Language = javascript ]
This client event, if present, is fired when the page is loaded.
method setExpanded(flag, tuple)
[ Language = javascript ]
Set the expanded state of this expando.
tuple, if supplied, is the current tuple number
for cases when this expando is used within a repeating group.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
method toggleExpanded(tuple)
[ Language = javascript ]
Toggle the current expanded state of this expando node.
tuple, if supplied, is the current tuple number
for cases when this expando is used within a repeating group.