abstract class %ZEN.Component.abstractListBox
extends control
This is an abstract base class that provides common functionality
to the various listBox controls.
parameter DEFAULTCONTROLCLASS = "listBox";
The default css class used for the main element within this control. This
is overridden by subclasses.
property hzScroll
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, allow this component to display horizontal scroll bars
if they are needed (and its current CSS style specifies them).
property listHeight
as %ZEN.Datatype.length;
If defined, override default height of listBox.
This is a CSS length value, e.g., "400px"
property listWidth
as %ZEN.Datatype.length;
If defined, override default width of listBox.
This is a CSS length value, e.g., "400px"
property selectedIndex
as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Index (0-based) of current selected option.
This is the ordinal position of the current item within the item list.
property text
as %ZEN.Datatype.string(XMLPROJECTION="none");
Text (display) value of current item.
Do not access this directly; use getProperty('text') instead.
method %DrawHTML()
Draw HTML for this listBox.
Note that the actual value is placed in a hidden control.
method %DrawListContents()
Server-side method to provide contents of the list box.
This is implemented by a subclass. If not implemented,
then the listbox will render its contents on the client.
method %GetDisplayValue(pValue As %String)
as %String
Lookup up the display value for the listBox given
a logical value.
This is called when the control is initially drawn.
Note: this is implemented as an expression method; subclasses are
free to implement this as a regular method.
method clickItem(idx)
[ Language = javascript ]
User has clicked an item in the list box.
method dblClickItem(idx)
[ Language = javascript ]
User has double-clicked an item in the list box.
method dragStartHandler(dragData)
[ Language = javascript ]
Default drag handler for list components.
method focus()
[ Language = javascript ]
Client-side method to input focus to this control.
method getItemEl(idx)
[ Language = javascript ]
Return HTML element for given list item number.
method getOptionCount()
[ Language = javascript ]
Return number of items in list.
This must be overridden in subclasses.
method getOptionText(idx)
[ Language = javascript ]
Return the display text for the given item (0-based) in the dropdown list.
This must be overridden in subclasses.
method getOptionValue(idx)
[ Language = javascript ]
Return the logical value of the given item (0-based) in the list.
This must be overridden in subclasses.
method lbKeyBlur()
[ Language = javascript ]
Focus taken from the invisible edit control.
method lbKeyDownHandler(evt)
[ Language = javascript ]
Process keydown event within the invisible edit control.
method lbKeyFocus()
[ Language = javascript ]
Focus passed to the invisible edit control.
method lbKeyPressHandler(evt)
[ Language = javascript ]
Process keypress event within the invisible edit control.
method moveToItem(dir)
[ Language = javascript ]
Move to a new item in the listBox. dir is "up","down","left","right"
Returns true if move was successful.
method onCreate()
[ Language = javascript ]
Initialize additional client-side values
method selectItem(idx)
[ Language = javascript ]
User has selected an item in the list box.
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.