JSEditableComboBox

From GeoMedia Smart Client
Jump to: navigation, search
GMSC 2013/2014 Javascript API Overview Form Events Types Utility Functions client-side Validation Conditions Interaction with SmartClient Cookbook Cheatsheet
Form Models BaseModel FormModel TabModel GroupModel Field Models ActionModel
Field Models AutoComplete CheckBox ComboBox DatePicker DateTimePicker EditableComboBox Editor FilePicker Grid Hyperlink Image Label Password Radio TextArea TextField


The editable combobox widget allows the selection of one item out of a larger collection of items. Additionally, the user can select an item by typing in some letters. Note that the total number of items should not exceed 100 for performance reasons. The widget inherits all methods and properties from BaseModel. This widget is available since GMSC 2013.


Methods & Properties

This widget inherits all methods and properties from BaseModel. The following methods have a different behaviour:

fill(values, selectedValue)

pre-fills the widget with a list of values and optionally selects the selected Value.


Parameters

{Array} values An array of objects containing the list-of-value items. Each item must have the following structure {id: 'valueOfItem', name: 'Label shown in the widget'}

{String} selectedValue (optional) value that should be pre-selected.

Example

Fill a list-of-value-widget (AutoComplete, Combobox or editable Combobox) with two items and pre-select the second one:

var lovWidget = IG.form.getItemById('LOV');
lovWidget.fill([{id: '1', name: 'First Item'},{id: '2', name: 'Second Item'}], '2');


Screenshot

Editable combobox.png