Skip to main content

%ZEN.Component.listBox

class %ZEN.Component.listBox extends %ZEN.Component.abstractListBox

This is a listBox control implemented using HTML primitives.
It offers some features not provided by the HTML select control. In addition it solves many of the problems found in the Internet Explorer version of the select control (such as problems interoperating with CSS).
The contents displayed by the combobox dropdown list are defined using a set of %ZEN.Auxiliary.option objects.
For example:
<listBox>
<option value="1" text="Apple" />
<option value="2" text="Banana"/>
</listBox>
The listBox control will support both drag and drop. If dragEnabled is true, then the user can drag values from the list box and drop them on other drop-enabled components.
If dropEnabled is true, then values can be dropped onto the list. They will be appended to the end of the list. If both drag and drop are enabled, then it is also possible to move items within this listBox using the mouse.

Property Inventory

Method Inventory

Properties

property options as list of %ZEN.Auxiliary.option (XMLELEMENTREF = 1, XMLPROJECTION = "ELEMENT", XMLREF = 1, XMLTYPECONSTRAINT = "CHOICE", ZENSETTING = 0);
Set of options displayed within the combobox.
Property methods: optionsBuildValueArray(), optionsCollectionToDisplay(), optionsCollectionToOdbc(), optionsDisplayToCollection(), optionsGet(), optionsGetObject(), optionsGetObjectId(), optionsGetSwizzled(), optionsIsValid(), optionsOdbcToCollection(), optionsSet(), optionsSetObject(), optionsSetObjectId()

Methods

method %SetDefaultValues()
This method fills in reasonable default values for this control. Used by tools (such as Control Tester) to dynamically create controls.
clientmethod appendOption(value, text, style) [ Language = javascript ]
Create a new option and append it to this listBox. If text is omitted, then value is used as the display value.
clientmethod dropStartHandler(dragData) [ Language = javascript ]
Default drop handler for listBox components.
clientmethod getOptionCount() [ Language = javascript ]
Inherited description: Return number of items in list.
This must be overridden in subclasses.
clientmethod getOptionText(idx) [ Language = javascript ]
Return the display text for the given item (0-based) in the dropdown list.
clientmethod getOptionValue(idx) [ Language = javascript ]
Return the logical value of the given item (0-based) in the dropdown list.
clientmethod insertOption(index, value, text, style) [ Language = javascript ]
Create a new option and insert it into the set of listBox options. The new option is inserted immediately before the option with index index. If text is omitted, then value is used as the display value.
clientmethod moveOption(index, newIndex) [ Language = javascript ]
Move the option at position index to position newIndex (0-based). Slide other options if need be.
clientmethod onloadHandler() [ Language = javascript ]
This client event, if present, is fired when the page is loaded.
clientmethod removeOption(index) [ Language = javascript ]
Remove an option from this listBox.
index is the index number (0-based) of the option.
clientmethod resetOptions() [ Language = javascript ]
Remove all options from this listBox.
Clears the current value of the listBox.
If there is a value for valueList it is cleared as well.
clientmethod setOption(index, value, text, style) [ Language = javascript ]
Set the properties of an option within this listBox.
index is the index number (0-based) of the option.
If text is omitted, then value is used as the display value.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab