abstract class %ZEN.Component.abstractGroup
extends component
Abstract container component.
This is the base class from which various types of grouping elements are derived.
parameter DEFAULTGROUPCLASS = "group";
Subclasses can set this to change default css class for a group.
parameter SYSMODULE = "core";
If set, this indicates that this system component should be
placed in the given "module". A module is a grouping of components
within the same class package that share common include (js or css) files.
Note that certain root classes are implicitly placed within the "core"
module.
Classes outside of the Zen library should not set this, they should use
the MODULE instead.
property children
as list of component(XMLELEMENTREF=1,XMLPROJECTION="ELEMENT",XMLTYPECONSTRAINT="CHOICE",ZENSETTING=0);
Set of components within this group.
property disabled
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, this group and its children are disabled.
final method %AddChild(pComponent As %ZEN.Component.object)
as %Status
Add a child component pComponent to this group.
This is called when the server component tree is being created.
This also adds pComponent to the page that this group
belongs to; this group must be added to a page before adding any child
components to it. In addition, the id property
of the component must be set before calling this method.
final method %AddChildAfter(pComponent As %ZEN.Component.object, pSibling As %ZEN.Component.object = "")
as %Status
Add a child component pComponent to this group immediately
after component pSibling.
If pSibling is not a member of this group, this method will fail.
This is called when the server component tree is being created.
This also adds pComponent to the page that this group
belongs to; this group must be added to a page before adding any child
components to it. In addition, the id property
of the component must be set before calling this method.
final method %AddChildBefore(pComponent As %ZEN.Component.object, pSibling As %ZEN.Component.object = "")
as %Status
Add a child component pComponent to this group immediately
before component pSibling.
If pSibling is not a member of this group, this method will fail.
This is called when the server component tree is being created.
This also adds pComponent to the page that this group
belongs to; this group must be added to a page before adding any child
components to it. In addition, the id property
of the component must be set before calling this method.
method %GetChildIndex(pChild As %ZEN.Component.component)
as %Integer
Server-only method: Look for the given child object within this group's set of
children and return its 1-based index number.
Returns -1 if unable to find the child.
method %OnMutateChildren(pAdd As %Boolean)
as %Boolean
Notification that children have been added or removed from this group.
method %RemoveChild(pComponent As %ZEN.Component.object)
as %Boolean
Remove child component pComponent from this group.
Returns true if the component was found and removed.
method %RemoveChildren(pDynamicOnly As %Boolean = 0)
Remove all children from this group.
If pDynamicOnly is true, then only delete components
whose dynamic is set to true.
method addChild(component, refresh)
[ Language = javascript ]
Client-side method.
Dynamically add a component to this group on the client.
If refresh is true, then refresh the contents of this group
to show the new component.
method addChildAfter(component, sibling, refresh)
[ Language = javascript ]
Client-side method.
Dynamically add a component to this group on the client after component
sibling.
If refresh is true, then refresh the contents of this group
to show the new component.
method addChildBefore(component, sibling, refresh)
[ Language = javascript ]
Client-side method.
Dynamically add a component to this group on the client before component
sibling.
If refresh is true, then refresh the contents of this group
to show the new component.
abstract method childrenMutated()
[ Language = javascript ]
Notification to subclasses that a child has been added or removed
from this group.
method exposeComponent()
[ Language = javascript ]
This manages the ondisplay event callback handling. The display event
fires when the page is first displayed, when the component or its containing
group is refreshed from the server, or when the component or its containing
group is displayed via a programmatic 'show()' call. Note that setting the
style.display value from JavaScript DOES NOT trigger this event. In general,
application code should not modify or overload this method; instead, use the
onDisplayHandler() to customize this processing.
method getChildIndex(child)
[ Language = javascript ]
Look for the given child object within this group's set of
children and return its 0-based index number.
Returns -1 if unable to find the child.
method onRefreshContents()
[ Language = javascript ]
This client event, if present, is fired when the page is loaded.
abstract method ondisabledHandler()
[ Language = javascript ]
Client-side method that is called when a group's disabled
state changes. This gives subclasses a chance to update their
style when they are enabled/disabled.
method onloadHandler()
[ Language = javascript ]
This client event, if present, is fired when the page is loaded.
method removeChild(component)
[ Language = javascript ]
Client-side method.
Dynamically remove a component from this group on the client.
method setOverlayMode(mode)
[ Language = javascript ]
Set overlay mode for each child of this group.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
Assume that subclasses that simply wrap HTML controls
have named the control 'control' or else have overridden
this method.
method setPropertyAll(property, value, value2)
[ Language = javascript ]
Apply the given value to the specified property for
this group and all of its children.
Note that this will not work for 'disabled'; for that
use setProperty.