
public class SelectMulti extends InputControl
Example render:
Label | val1 |
|[ val2 ]|
|[ val3 ]|
| val4 |
| val5 |
The Objects in the list are displayed in a textual form by trying to convert them to a readable String, by using their .toString() method or their URI if they are Resources. When retrieving the input, remember to cast to the appropriate original type of Object.
| Modifier and Type | Field and Description |
|---|---|
protected Integer |
initialValue
Initial selected index.
|
model| Constructor and Description |
|---|
SelectMulti()
Generic empty constructor.
|
SelectMulti(String ref)
Constructor with the reference of the input to be used in request and
response.
|
SelectMulti(String ref,
String label)
Constructor with the reference of the input to be used in request and
response.
|
SelectMulti(String ref,
String label,
Object[] initialOptions)
Constructor with the reference of the input to be used in request and
response.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOption(Object option)
Add an option to the list of possible options.
|
String[] |
create(Group group)
This method is for internal use of utils only.
|
Integer |
getInitialIndex()
Get the initial value of the selection as an index in the array of
options.
|
Object[] |
getOptions()
Get the possible options to select.
|
void |
setInitialIndex(Integer initialIndex)
Set the initial value of the selection as the index in the array of
options.
|
void |
setOptions(Object[] options)
Get the possible options to select.
|
getModelgetHelp, getHint, getLabel, getReference, setHelp, setHint, setLabel, setReference, setReferenceprotected Integer initialValue
public SelectMulti()
public SelectMulti(String ref)
ref - The simple reference identifying the input. Set to null to
auto-generate.public SelectMulti(String ref, String label)
ref - The simple reference identifying the input. Set to null to
auto-generate.label - The label text that identifies the input to the user.public SelectMulti(String ref, String label, Object[] initialOptions)
ref - The simple reference identifying the input. Set to null to
auto-generate.label - The label text that identifies the input to the user.initialOptions - An array of Objects that represent the different possible
options to select.public String[] create(Group group)
Controlcreate in class Controlgroup - The UI group to which the control is being added.public Integer getInitialIndex()
public void setInitialIndex(Integer initialIndex)
initialIndex - The index of the initial valuepublic Object[] getOptions()
public void addOption(Object option)
option - The option to addpublic void setOptions(Object[] options)
options - The array of Strings representing the different options to
selectCopyright © 2018 universAAL Consortium. All rights reserved.