|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--Field
|
+--SelectField
Defined in form.js
| Field Summary | |
Boolean |
multiple
Indicates if the field accepts multiple choice |
| Fields inherited from class Field |
fld, id, name, label, type
|
| Constructor Summary | |
SelectField
(<Object> fld)
Class used to encapsulate operations over select inputs, accepting single or multiple choice |
|
| Method Summary | |
void
|
addOption(<String> value, <String> text, <Number> pos)
Add a new option in the select field |
void
|
clear()
Unselect all selected options in the list |
void
|
clearOptions()
Remove all options off the select field |
Object
|
getValue()
Gets the current selected option(s). |
void
|
importOptions(<String> str, <String> lsep, <String> csep, <Number> pos, <String> val)
Import options to the select field from a string splitted by line and column separators. |
void
|
removeOption(<Number> idx)
Remove an option from the list |
void
|
removeSelectedOptions(<Function> func, <Number> idx)
Remove the selected options from the list. |
void
|
selectByText(<String> text)
Select an option by its text |
void
|
setFirstOption(<String> value, <String> text)
Change the first option of the select field |
void
|
setValue(<Object> val)
Changes the selected option(s) in the field. |
| Methods inherited from class Field |
getFormElement, getMask, isEmpty, enable, disable, setDisabled, focus, beforeFocus, serialize
|
| Field Detail |
Boolean multiple
| Constructor Detail |
SelectField(<Object> fld)
fld - Field object
| Method Detail |
void addOption(<String> value, <String> text, <Number> pos)
value - Option value
text - Option text
pos - Option position (defaults to last position)
void clear()
void clearOptions()
Object getValue()
void importOptions(<String> str, <String> lsep, <String> csep, <Number> pos, <String> val)
str - Options string
lsep - Line separator
csep - Column separator
pos - Insertion position
val - Value to set
void removeOption(<Number> idx)
idx - Option index
void removeSelectedOptions(<Function> func, <Number> idx)
func - Callback for each removed option
idx - Start index. Defaults to 0
void selectByText(<String> text)
text - Option text
void setFirstOption(<String> value, <String> text)
value - Option value
text - Option text
void setValue(<Object> val)
val - New value
|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||