:: com :: sun :: star :: form :: component ::

service DatabaseListBox

Included Services - Summary
ListBox
(referenced entity's summary:)
::com::sun::star::form::DataAwareControlModel
(referenced entity's summary:)
Properties' Summary
short
BoundColumn
specifies which column of the list result set should be used for data exchange.  
::com::sun::star::form::ListSourceType
ListSourceType
describes the kind of list source used.  
[ transient ] sequence< any >
SelectedValues
[ OPTIONAL ]
The selected values.  
[ transient ] any
SelectedValue
[ OPTIONAL ]
The selected value, if there is at most one.  
Included Services - Details
ListBox
(referenced entity's summary:)
::com::sun::star::form::DataAwareControlModel
(referenced entity's summary:)
Properties' Details
BoundColumn
short BoundColumn;
Description
specifies which column of the list result set should be used for data exchange.

When you make a selection from a list box, the "BoundColumn" property reflects which column value of a result set should be used as the value of the component. If the control is bound to a database field, the column value is stored in the database field identified by the property com::sun::star::form::DataAwareControlModel::DataField.

-1
The index (starting at 0) of the selected list box entry is stored in the current database field.
0 or greater
The column value of the result set at the position (0-indexed) is stored in the current database field. In particular, for value 0, the selected (displayed) list box string is stored.

The bound column property is only used if a list source is defined and the list source matches with the types com::sun::star::form::ListSourceType::TABLE, com::sun::star::form::ListSourceType::QUERY, com::sun::star::form::ListSourceType::SQL or com::sun::star::form::ListSourceType::SQLPASSTHROUGH. Otherwise the property is ignored, as there is no result set from which to get the column values.

ListSourceType
::com::sun::star::form::ListSourceType ListSourceType;
Description
describes the kind of list source used.

Depending on the value of this property, the way the value of ListBox::ListSource is evaluated varies.

com::sun::star::form::ListSourceType::VALUELIST
The elements in the string sequence in ListBox::ListSource build up the entry list.
com::sun::star::form::ListSourceType::TABLE
The first element of the string sequence in ListBox::ListSource determines the table which the list result set should be based on.
com::sun::star::form::ListSourceType::QUERY
The first element of the string sequence in ListBox::ListSource determines the query which the list result set should be based on.
For retrieving the query, the connection which the data form is working with (com::sun::star::sdb::RowSet::ActiveConnection) is queried for the com::sun::star::sdb::XQueriesSupplier interface.
com::sun::star::form::ListSourceType::SQL
The first element of the string sequence in ListBox::ListSource contains the SQL statement which the list result set should be based on.

com::sun::star::form::ListSourceType::SQLPASSTHROUGH
The first element of the string sequence in ListBox::ListSource contains the SQL statement which the list result set should be based on.
The statement is not analyzed by the parser. This means that you can use database specific SQL features here, but, on the other hand, lose features like parameter value substitution.
com::sun::star::form::ListSourceType::TABLEFIELDS
The first element of the string sequence in ListBox::ListSource determines the table whose column names should fill the list.

SelectedValues
[ transient ] sequence< any > SelectedValues;
Usage Restrictions
optional
Description
The selected values.
SelectedValue
[ transient ] any SelectedValue;
Usage Restrictions
optional
Description
The selected value, if there is at most one.

 
Top of Page