|
jsm | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--JsmObject
|
+--JsmWidget
|
+--JsmSelectField
Represents a select box
Defined in net/sf/jsm/widgets/+jsmSelectField.js
| Field Summary | |
Object |
_delimiter
|
Object |
_multi
Flag if this is a multi select box |
<private> Array |
_options
The options of this select box |
Object |
_size
How many options will be shown |
Object |
selected
The selected option's values or labels |
| Fields inherited from class JsmObject |
className, id, META_DATA_NAME_PROPERTY_PATH, META_DATA_NAME_VALUE, _attributes, _metaData
|
| Constructor Summary | |
JsmSelectField
(<Array> options, <Array> selectedValueOrLabel, <boolean> multi, <int> size)
Creates a new JsmSelectField |
|
| Method Summary | |
Object
|
addOption(<String> value, <String> label)
Add a single option to this select box |
JsmSelectField
|
clone()
Clones this JsmSelectField |
Object
|
getNode()
Returns the node of the view component; the model (this) will be attached to the node as property 'model' |
Array
|
getOptions()
|
Array
|
getSelected()
Get the selected options values or labels |
int
|
getSize()
Get the number of visible options |
Object
|
init(<JsmTd> theTd)
Init this select box; set selected to the cells value |
boolean
|
isMulti()
Is this a multiselectbox |
Object
|
setMulti(<boolean> multi)
Set the flag if this is a multiselectbox |
Object
|
setOptions(<Array> options)
Set the options |
Object
|
setSelected(<Array> selectedValueOrLabel)
Set the selected options values or labels |
Object
|
setSize(<int> size)
Set the number of visible options |
void
|
updateModel(<JsmTable> table, <int> rowIdx, <int> columnIdx, theViewComponent)
Update the tabel model if all validators are passed; will set the value and the meta data {@see JsmObject.META_DATA_NAME_VALUE} on the hosting {@JsmTd} object. |
| Methods inherited from class JsmWidget |
validate, addValidator, getValidators, removeValidators
|
| Methods inherited from class JsmObject |
toString, identify, setId, getId, setAttribute, getAttribute, setMetaData, getMetaData, addAttributesToViewComponent
|
| Field Detail |
Object _delimiter
Object _multi
<private> Array _options
Object _size
Object selected
| Constructor Detail |
JsmSelectField(<Array> options, <Array> selectedValueOrLabel, <boolean> multi, <int> size)
options - Array of options (value-label pairs), eg. [{'value':0, 'label':"All"},{'value':1, 'label':"UK"},{'value':2, 'label':"Ireland"}]
selectedValueOrLabel - Array of selected values or labels
multi - Indicates if this is a multiselectbox
size - Amount of visible options
| Method Detail |
Object addOption(<String> value, <String> label)
value -
label -
JsmSelectField clone()
Object getNode()
Array getOptions()
Array getSelected()
int getSize()
Object init(<JsmTd> theTd)
theTd - The cell in which this widget is displayed
boolean isMulti()
Object setMulti(<boolean> multi)
multi -
Object setOptions(<Array> options)
options - Array of options (value-label pairs), eg. [{'value':0, 'label':"All"},{'value':1, 'label':"UK"},{'value':2, 'label':"Ireland"}]
Object setSelected(<Array> selectedValueOrLabel)
selectedValueOrLabel - Array of selected values or labels
Object setSize(<int> size)
size -
void updateModel(<JsmTable> table, <int> rowIdx, <int> columnIdx, theViewComponent)
table - The table this widget is attached to
rowIdx - The index of the row
columnIdx - The index of the column
theViewComponent -
|
jsm | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||