Home > Class Reference > ENSLIB namespace > %ZEN.Component.dataCombo


class %ZEN.Component.dataCombo extends %ZEN.Component.abstractComboBox, %ZEN.Component.querySource

A dataCombo is a specialized type of abstractComboBox that presents the user with a set of options that are provided by querying the database.

Contents of the dataCombo Dropdown
The contents of the dataCombo dropdown are provided by creating, executing, and fetching from a %ResultSet object on the server.
Initially the contents of the dropdown are empty until the user causes the dropdown to appear at which point a call to the server is made to fetch the dropdown contents. You can change this behavior by setting the cached property.
You can specify how this %ResultSet object is created using the properties inherited from the querySource class.
The number of columns returned by the %ResultSet determines what is displayed within the dropdown list in the following way:
Logical and Display Values
A combobox has two current values: a logical value (its internal value returned by the getValue() method), and a display value (the value displayed to the user). (In some cases, the logical and display values may be the same).
Unlike a traditional HTML select control, the ZEN dataCombo does not contain every possible logical/display value within its dropdown list. Instead it constructs the contents of its dropdown list on demand. This behavior makes it much better suited for database applications (where the set of possible values can be long and unwieldy).
When an application sets the value of a dataCombo control, it s