Skip to main content

%ZEN.Component.combobox

class %ZEN.Component.combobox extends %ZEN.Component.abstractComboBox

A combobox is a specialized type of abstractComboBox that presents the user with a pre-defined set of options.
The contents displayed by the combobox dropdown list are defined using a set of %ZEN.Auxiliary.option objects.
For example:
<combobox id="comboboxEdit" label="Editable" editable="true">
<option value="1" text="Apple" />
<option value="2" text="Banana" style="font-size: 2.5em; "/>
</combobox>

Property Inventory

Method Inventory

Properties

property displayList as %ZEN.Datatype.csv (ZENLOCALIZE = 1);
(Optional) A csv-list of values used for display values within this combobox.
This is only used if the valueList property is defined.
The entire list is a localized value. If your data include commas, escape them with "\,".
Property methods: displayListDisplayToLogical(), displayListGet(), displayListIsValid(), displayListLogicalToDisplay(), displayListLogicalToOdbc(), displayListNormalize(), displayListSet()
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. Each option is a %ZEN.Auxiliary.option object. For each option you specify a logical value, a display value, and an optional CSS style.
Property methods: optionsBuildValueArray(), optionsCollectionToDisplay(), optionsCollectionToOdbc(), optionsDisplayToCollection(), optionsGet(), optionsGetObject(), optionsGetObjectId(), optionsGetSwizzled(), optionsIsValid(), optionsOdbcToCollection(), optionsSet(), optionsSetObject(), optionsSetObjectId()
property valueList as %ZEN.Datatype.csv;
(Optional) A csv-list of values used for logical values within this combobox.
If this is defined, then the options property is ignored.
If your data include commas, escape them with "\,".
Property methods: valueListDisplayToLogical(), valueListGet(), valueListIsValid(), valueListLogicalToDisplay(), valueListLogicalToOdbc(), valueListNormalize(), valueListSet()

Methods

method %GetDisplayValue(pValue As %String) as %String
Lookup up the display value for the combobox given a logical value.
This is called when the control is initially drawn.
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 combobox. If text is omitted, then value is used as the display value.
clientmethod getOption(idx) [ Language = javascript ]
Return the %ZEN.Auxiliary.option option object associated with the given item (0-based) in the dropdown list.
If valueList is defined, then this returns null.
clientmethod getOptionCount() [ Language = javascript ]
Return number of items in dropdown list.
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 removeOption(index) [ Language = javascript ]
Remove an option from this combobox.
index is the index number (0-based) of the option.
clientmethod resetOptions() [ Language = javascript ]
Remove all options from this combobox.
Clears the current value of the combobox.
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 combobox.
index is the index number (0-based) of the option.
If text is omitted, then value is used as the display value.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab