Skip to main content


deprecated class %ZEN.Component.dataListBox extends %ZEN.Component.abstractListBox, %ZEN.Component.querySource

This is a listBox that gets its list from an SQL query.
Refer to the %ZEN.Component.querySource class for a description of how to provide data for this component.
The dataListBox 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. The value of the list box will be set to the value of the dropped data.

Property Inventory

Method Inventory


property OnDrawItem as %ZEN.Datatype.delegator (FORMALSPEC = "pRS:%SQL.StatementResult,pValue:%String,pText:%String", RETURNTYPE = "%String");
(optional) Name of Server-side callback method that is called for each item in the list before it is displayed. This callback is passed the logical and display value for the current item. It returns the HTML that is to be displayed within the cell for the given item.
This must be the name of a server-only method in the page class that contains this dataListBox. Note: If using multi-column output, it is being called individually for each column
Property methods: OnDrawItemDisplayToLogical(), OnDrawItemGet(), OnDrawItemIsValid(), OnDrawItemLogicalToDisplay(), OnDrawItemLogicalToOdbc(), OnDrawItemNormalize(), OnDrawItemSet()
property choiceColumn as %ZEN.Datatype.integer (MINVAL = 1, ZENSETTING = 0) [ InitialExpression = 2 ];
If there are multiple data columns displayed within the data list this is the column number (1-based) of the column that will provide the display value for this control.
If this value is greater than the number of columns in the query then the second column will be used.
Property methods: choiceColumnDisplayToLogical(), choiceColumnGet(), choiceColumnIsValid(), choiceColumnLogicalToDisplay(), choiceColumnLogicalToOdbc(), choiceColumnNormalize(), choiceColumnSet()
property contentType as %ZEN.Datatype.string (VALUELIST = ",text,html") [ InitialExpression = "text" ];
Indicates how display values should be rendered:
If contentType is "text" (the default) then the display values will be HTML-escaped before being rendered.
If contentType is "html" then the display values will not be HTML-escaped before being rendered. Use this when your display values contain HTML markup that you do not want escaped.
Property methods: contentTypeDisplayToLogical(), contentTypeGet(), contentTypeIsValid(), contentTypeLogicalToDisplay(), contentTypeLogicalToOdbc(), contentTypeNormalize(), contentTypeSet()
property displayColumns as %ZEN.Datatype.csv (ZENSETTING = 0);
If there are multiple data columns displayed in the data list, this optional property defines a comma-delimited list of the column numbers of the column that should be displayed.
Property methods: displayColumnsDisplayToLogical(), displayColumnsGet(), displayColumnsIsValid(), displayColumnsLogicalToDisplay(), displayColumnsLogicalToOdbc(), displayColumnsNormalize(), displayColumnsSet()
property itemCount as %ZEN.Datatype.integer (XMLPROJECTION = "none");
Number of options within the list.
This is calculated when the query for this component is run.
Property methods: itemCountDisplayToLogical(), itemCountGet(), itemCountIsValid(), itemCountLogicalToDisplay(), itemCountLogicalToOdbc(), itemCountNormalize(), itemCountSet()
property multiColumn as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true (the default), then display multiple columns in the data list if the result set contains more than 2 columns.
Property methods: multiColumnDisplayToLogical(), multiColumnGet(), multiColumnIsValid(), multiColumnLogicalToDisplay(), multiColumnLogicalToOdbc(), multiColumnLogicalToXSD(), multiColumnNormalize(), multiColumnSet(), multiColumnXSDToLogical()
property parameters as list of %ZEN.Auxiliary.parameter (XMLNAME = "parameter", XMLPROJECTION = "ELEMENT");
User-defined list of query parameters.
These values are passed on to the user callback function that provides the query for this component in order to provide values for any run-time query parameters.
Property methods: parametersBuildValueArray(), parametersCollectionToDisplay(), parametersCollectionToOdbc(), parametersDisplayToCollection(), parametersGet(), parametersGetObject(), parametersGetObjectId(), parametersGetSwizzled(), parametersIsValid(), parametersOdbcToCollection(), parametersSet(), parametersSetObject(), parametersSetObjectId()
property sqlLookup as %ZEN.Datatype.sql;
(optional) SQL statement that, given a value, finds a display value. If present, this is used to find the initial display value for cases where the logical and display values are different.
Property methods: sqlLookupDisplayToLogical(), sqlLookupGet(), sqlLookupIsValid(), sqlLookupLogicalToDisplay(), sqlLookupLogicalToOdbc(), sqlLookupNormalize(), sqlLookupSet()
property valueColumn as %ZEN.Datatype.integer (MINVAL = 1, ZENSETTING = 0) [ InitialExpression = 1 ];
If there are multiple data columns displayed in the data list this is the column number (1-based) of the column that will provide the logical value for this control.
If this value is greater than the number of columns in the query then the first column will be used.
Property methods: valueColumnDisplayToLogical(), valueColumnGet(), valueColumnIsValid(), valueColumnLogicalToDisplay(), valueColumnLogicalToOdbc(), valueColumnNormalize(), valueColumnSet()


method %DrawListContents()
Server-side method to provide contents of the list box.
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. A logical value of "", must have a display value of "".
method %SetDefaultValues()
This method fills in reasonable default values for this control. Used by tools (such as Control Tester) to dynamically create controls.
clientmethod executeQuery() [ Language = javascript ]
Execute the server-side associated with this dataListBox.
The query is executed asynchronously, so results may not be available immediately.
clientmethod getOptionCount() [ Language = javascript ]
Return number of items in list.
clientmethod getOptionText(idx) [ Language = javascript ]
Return the display text for the given item (0-based) in the list.
clientmethod getOptionValue(idx) [ Language = javascript ]
Return the logical value of the given item (0-based) in the list.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Inherited description: 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.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab