Skip to main content

%ZEN.Component.component

deprecated abstract class %ZEN.Component.component extends %ZEN.Component.object

This is the base class for all visual, HTML-based Zen components.

Property Inventory

Method Inventory

Parameters

parameter DEFAULTENCLOSINGCLASS = zendiv;
Subclasses can set this to change default enclosingClass used for this component.
parameter DEFAULTHEIGHT;
Subclasses can set this to change default height for a component.
parameter DEFAULTHIDDEN = 0;
Subclasses can set this to change default hidden property for a component.
parameter DEFAULTHINTCLASS = zenHint;
Subclasses can set this to change default css class used for hints.
parameter DEFAULTLABELCLASS = zenLabel;
Subclasses can set this to change default css class used for labels.
parameter DEFAULTLABELDISABLEDCLASS = zenLabelDisabled;
Subclasses can set this to change default css class used for disabled labels.
parameter DEFAULTVISIBLE = 1;
Subclasses can set this to change default visibilty for a component.
parameter DEFAULTWIDTH;
Subclasses can set this to change default width for a component.

Properties

property align as %ZEN.Datatype.align;
Specifies how this component should be horizontally aligned within its layout cell.
Property methods: alignDisplayToLogical(), alignGet(), alignIsValid(), alignLogicalToDisplay(), alignLogicalToOdbc(), alignNormalize(), alignSet()
property containerStyle as %ZEN.Datatype.style;
CSS style applied to the td element used to contain this child component within its parent group's layout table. This overrides the parent group's cellStyle property for this child. Typically this is used to provide padding or alignment for a specific component. This only applies to layout strategies that use tables.
Property methods: containerStyleDisplayToLogical(), containerStyleGet(), containerStyleIsValid(), containerStyleLogicalToDisplay(), containerStyleLogicalToOdbc(), containerStyleNormalize(), containerStyleSet()
property dragEnabled as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If this value is true and dragAndDrop is enabled for the page, then this component can serve as a drag source (i.e., users can start a drag and drop operation over this component). The actual behavior is determined by the subclass implementation.
Property methods: dragEnabledDisplayToLogical(), dragEnabledGet(), dragEnabledIsValid(), dragEnabledLogicalToDisplay(), dragEnabledLogicalToOdbc(), dragEnabledLogicalToXSD(), dragEnabledNormalize(), dragEnabledSet(), dragEnabledXSDToLogical()
property dropEnabled as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If this value is true and dragAndDrop is enabled for the page, then this component can serve as a drag target (i.e., users can end a drag and drop operation over this component). The actual behavior is determined by the subclass implementation.
Property methods: dropEnabledDisplayToLogical(), dropEnabledGet(), dropEnabledIsValid(), dropEnabledLogicalToDisplay(), dropEnabledLogicalToOdbc(), dropEnabledLogicalToXSD(), dropEnabledNormalize(), dropEnabledSet(), dropEnabledXSDToLogical()
property enclosingClass as %ZEN.Datatype.cssClass [ InitialExpression = ..#DEFAULTENCLOSINGCLASS ];
Optional CSS class used for this component's enclosing div.
Property methods: enclosingClassDisplayToLogical(), enclosingClassGet(), enclosingClassIsValid(), enclosingClassLogicalToDisplay(), enclosingClassLogicalToOdbc(), enclosingClassNormalize(), enclosingClassSet()
property enclosingStyle as %ZEN.Datatype.style;
Optional CSS style applied to this component's enclosing div.
Property methods: enclosingStyleDisplayToLogical(), enclosingStyleGet(), enclosingStyleIsValid(), enclosingStyleLogicalToDisplay(), enclosingStyleLogicalToOdbc(), enclosingStyleNormalize(), enclosingStyleSet()
property error as %ZEN.Datatype.string (XMLPROJECTION = "none", ZENSETTING = 0);
Run-time value; Set to indicate an error within this component.
This is primarily used by controls. It is defined here for flexibility.
Property methods: errorDisplayToLogical(), errorGet(), errorIsValid(), errorLogicalToDisplay(), errorLogicalToOdbc(), errorNormalize(), errorSet()
property height as %ZEN.Datatype.length [ InitialExpression = ..#DEFAULTHEIGHT ];
Specifies the height of this component with respect to its container.
Property methods: heightDisplayToLogical(), heightGet(), heightIsValid(), heightLogicalToDisplay(), heightLogicalToOdbc(), heightNormalize(), heightSet()
property hidden as %ZEN.Datatype.boolean (ZENEXPRESSION = 1) [ InitialExpression = ..#DEFAULTHIDDEN ];
If true, this component is hidden. That is, its enclosing element's display style is set to "none".
Property methods: hiddenDisplayToLogical(), hiddenGet(), hiddenIsValid(), hiddenLogicalToDisplay(), hiddenLogicalToOdbc(), hiddenLogicalToXSD(), hiddenNormalize(), hiddenSet(), hiddenXSDToLogical()
property hint as %ZEN.Datatype.caption;
User defined hint text used to display additional hint text for this component. If specified, the hint text is drawn below the component.
Property methods: hintDisplayToLogical(), hintGet(), hintIsValid(), hintLogicalToDisplay(), hintLogicalToOdbc(), hintNormalize(), hintSet()
property hintClass as %ZEN.Datatype.cssClass [ InitialExpression = ..#DEFAULTHINTCLASS ];
Optional CSS class used for the component hint.
Property methods: hintClassDisplayToLogical(), hintClassGet(), hintClassIsValid(), hintClassLogicalToDisplay(), hintClassLogicalToOdbc(), hintClassNormalize(), hintClassSet()
property hintStyle as %ZEN.Datatype.style;
User defined style used for the component hint.
Property methods: hintStyleDisplayToLogical(), hintStyleGet(), hintStyleIsValid(), hintStyleLogicalToDisplay(), hintStyleLogicalToOdbc(), hintStyleNormalize(), hintStyleSet()
property label as %ZEN.Datatype.caption;
User defined label used to label this component. The actual display of this label is managed by the group this component belongs to.
Property methods: labelDisplayToLogical(), labelGet(), labelIsValid(), labelLogicalToDisplay(), labelLogicalToOdbc(), labelNormalize(), labelSet()
property labelClass as %ZEN.Datatype.cssClass [ InitialExpression = ..#DEFAULTLABELCLASS ];
Optional CSS class used for the component label.
Property methods: labelClassDisplayToLogical(), labelClassGet(), labelClassIsValid(), labelClassLogicalToDisplay(), labelClassLogicalToOdbc(), labelClassNormalize(), labelClassSet()
property labelDisabledClass as %ZEN.Datatype.cssClass [ InitialExpression = ..#DEFAULTLABELDISABLEDCLASS ];
Optional CSS class used for the component label when disabled.
Property methods: labelDisabledClassDisplayToLogical(), labelDisabledClassGet(), labelDisabledClassIsValid(), labelDisabledClassLogicalToDisplay(), labelDisabledClassLogicalToOdbc(), labelDisabledClassNormalize(), labelDisabledClassSet()
property labelStyle as %ZEN.Datatype.style;
User defined style used for the component label.
Property methods: labelStyleDisplayToLogical(), labelStyleGet(), labelStyleIsValid(), labelStyleLogicalToDisplay(), labelStyleLogicalToOdbc(), labelStyleNormalize(), labelStyleSet()
property onafterdrag as %ZEN.Datatype.eventHandler);
onafterdrag event handler: If this value is true and dragEnabled is true and drag-and-drop is enabled for the current page, then this event is raised when a drag operation that started within this component completes.
Property methods: onafterdragDisplayToLogical(), onafterdragGet(), onafterdragIsValid(), onafterdragLogicalToDisplay(), onafterdragLogicalToOdbc(), onafterdragNormalize(), onafterdragSet()
property onbeforedrag as %ZEN.Datatype.eventHandler);
onbeforedrag event handler: If this value is true and dragEnabled is true and drag-and-drop is enabled for the current page, then this event is raised when a drag operation has been initiated within this component but before the component has started to process the event. This is for cases where you want to override the default drag behavior of a component.
Property methods: onbeforedragDisplayToLogical(), onbeforedragGet(), onbeforedragIsValid(), onbeforedragLogicalToDisplay(), onbeforedragLogicalToOdbc(), onbeforedragNormalize(), onbeforedragSet()
property ondrag as %ZEN.Datatype.eventHandler);
ondrag event handler: If this value is true and dragEnabled is true and drag-and-drop is enabled for the current page, then this event is raised when a drag operation has been initiated within this component.
Property methods: ondragDisplayToLogical(), ondragGet(), ondragIsValid(), ondragLogicalToDisplay(), ondragLogicalToOdbc(), ondragNormalize(), ondragSet()
property ondrop as %ZEN.Datatype.eventHandler);
ondrop event handler: If this value is true and dropEnabled is true and drag-and-drop is enabled for the current page, then this event is raised when a drop operation occurs within this component.
Property methods: ondropDisplayToLogical(), ondropGet(), ondropIsValid(), ondropLogicalToDisplay(), ondropLogicalToOdbc(), ondropNormalize(), ondropSet()
property onhide as %ZEN.Datatype.eventHandler;
onhide event handler: This event is fired when this component is made hidden.
Property methods: onhideDisplayToLogical(), onhideGet(), onhideIsValid(), onhideLogicalToDisplay(), onhideLogicalToOdbc(), onhideNormalize(), onhideSet()
property onrefresh as %ZEN.Datatype.eventHandler;
onrefresh event handler: This event is fired when the contents of this component are refreshed from the server.
Property methods: onrefreshDisplayToLogical(), onrefreshGet(), onrefreshIsValid(), onrefreshLogicalToDisplay(), onrefreshLogicalToOdbc(), onrefreshNormalize(), onrefreshSet()
property onshow as %ZEN.Datatype.eventHandler;
onshow event handler: This event is fired when this component is made visible.
Property methods: onshowDisplayToLogical(), onshowGet(), onshowIsValid(), onshowLogicalToDisplay(), onshowLogicalToOdbc(), onshowNormalize(), onshowSet()
property showLabel as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
Controls whether a label is displayed for this component.
If false do not display a label for this component. If labels are displayed to the left, the Layout Manager will attempt to give the space allocated for the label to the component as well. This makes this option useful for placing labels between sections in forms.
Property methods: showLabelDisplayToLogical(), showLabelGet(), showLabelIsValid(), showLabelLogicalToDisplay(), showLabelLogicalToOdbc(), showLabelLogicalToXSD(), showLabelNormalize(), showLabelSet(), showLabelXSDToLogical()
property slice as %ZEN.Datatype.integer (MINVAL = 0);
User-defined number of units of relative space this component's layout cell takes up within its group along the group layout direction. This may be used by a layout manager when calculating layout requirements.
Property methods: sliceDisplayToLogical(), sliceGet(), sliceIsValid(), sliceLogicalToDisplay(), sliceLogicalToOdbc(), sliceNormalize(), sliceSet()
property title as %ZEN.Datatype.caption;
Help text (tool tip) displayed when mouse hovers over this component (or its label).
Property methods: titleDisplayToLogical(), titleGet(), titleIsValid(), titleLogicalToDisplay(), titleLogicalToOdbc(), titleNormalize(), titleSet()
property valign as %ZEN.Datatype.valign;
Specifies how this component should be vertically aligned within its layout cell.
Property methods: valignDisplayToLogical(), valignGet(), valignIsValid(), valignLogicalToDisplay(), valignLogicalToOdbc(), valignNormalize(), valignSet()
property width as %ZEN.Datatype.length [ InitialExpression = ..#DEFAULTWIDTH ];
Specifies the width of this component with respect to its container.
Property methods: widthDisplayToLogical(), widthGet(), widthIsValid(), widthLogicalToDisplay(), widthLogicalToOdbc(), widthNormalize(), widthSet()

Methods

final method %DrawComponentHTML(pStyle As %String = "")
Draw enclosing div element and then draw contents within it.
final method %EnclosingDivId()
Compute the HTML id value used for an enclosing div. Use component id for enclosing div; if not defined use zen#, where # is the index number.
method %OnDrawEnclosingDiv() as %String
This callback, if defined, makes it possible for a subclass to inject additional attributes into the enclosing div element for a component. If implemented, this method should return a string with a leading space to avoid conflict with other attributes.
abstract clientmethod dragFinishHandler(dragData) [ Language = javascript ]
This is called when a drag operation started within this component is completed.
This method is implemented by subclasses.
final clientmethod dragHandler() [ Language = javascript ]
This is called by the layout manager when a drag-and-drop operation starts on this component.
final clientmethod dragNotifyHandler(dragData) [ Language = javascript ]
This is called by the layout manager when a drag operation that started on this component is completed (that is, after the target component finished processing the drop).
abstract clientmethod dragStartHandler(dragData) [ Language = javascript ]
This is called when a drag operation is started within this component.
This method is implemented by subclasses.
final clientmethod dropHandler() [ Language = javascript ]
This is called by the layout manager when a drag-and-drop operation ends on this component.
abstract clientmethod dropStartHandler(dragData) [ Language = javascript ]
This is called when a data drop operation is started within this component.
This method is implemented by subclasses.
clientmethod 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.
final clientmethod getEnclosingDiv() [ Language = javascript ]
Client-side method returns the div element that encloses this component.
clientmethod getHidden() as %String [ Language = javascript ]
Return whether this component is hidden.
final clientmethod getHintElement() [ Language = javascript ]
Client-side method returns the HTML element that displays the hint for this component (if any).
final clientmethod getLabelElement() [ Language = javascript ]
Client-side method returns the HTML element that displays the label for this component (if any).
abstract clientmethod onDisplayHandler() [ Language = javascript ]
This client callback is called from exposeComponent after the element has been displayed on the screen. This ia a synthetic event that 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
abstract clientmethod onEndModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to stop being modal.
abstract clientmethod onPopupAction(popupName, action, value) [ Language = javascript ]
This client event, if present, is fired when a popup page has specified this component as its parent and fires an action.
popupName is the name of the popup window sending the action.
action is the name of the action.
value is the value associated with the action.
abstract clientmethod onRefreshContents() [ Language = javascript ]
This client callback is called just from refreshContents just after the new HTML is delivered from the server.
abstract clientmethod onStartModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to become modal. zindex is zindex value to use to make sure component is placed above system-provided div element.
final clientmethod refreshContents(sync) [ Language = javascript ]
This method, called from a client page, invokes this component's %DrawHTML(), converts its output to a JavaScript string and replaces the component's enclosing div with this new HTML. This is useful for components that need to refresh their contents from the server after being rendered.
Internally, this refresh can occur immediately or be deferred as specified by the zenRefreshMode flag.
If sync is defined and is true, the refresh will be executed synchronously (unless we are in deferred mode).
clientmethod setHidden(flag) [ Language = javascript ]
If flag is true, hide this component otherwise make it visible. If present, invoke onshow or onhide callbacks.
clientmethod setOverlayMode(mode) [ Language = javascript ]
Expirimental: do not use.
Set the overlay mode for this component.
(An overlay is a transparent div placed atop a component for the purpose of capturing events; it is used by the ZEN Page editing utilities.)
mode is the overlay mode:
0: turn off overlay.
1: turn on overlay.
2: turn on overlay, show indication that this component is selected.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
clientmethod startProgressBar(div) [ Language = javascript ]
Start the display of a progress bar within display area for this component.
Typically this is used by components that refresh their contents from the server (such as tablePane).
div, if defined, is div element that will contain the progress bar.
clientmethod stopProgressBar() [ Language = javascript ]
Stop the timer used by the Progress bar.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab