public class Select extends Input
Modifier and Type | Class and Description |
---|---|
static class |
Select.Option |
Constructor and Description |
---|
Select(java.lang.String params,
java.lang.String options)
Creates this input parsing required values from the given text
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Select.Option> |
getOptionSet()
Returns a copy of the options for this select object
|
void |
setSelectedIndex(int index)
Sets the selected index of the option, 0 based
|
void |
setValueByText(java.lang.String text)
Sets the value for this element based on the given text
|
void |
setValueChecked(java.lang.Object value)
Sets the value for the input.
|
java.lang.String |
toString() |
public Select(@NotNull java.lang.String params, java.lang.String options)
params
- The contents of the input tagoptions
- The HTML found between the select tags, that contains the HTML for the optionspublic void setValueChecked(java.lang.Object value)
Input
setValueChecked
in class Input
value
- The new value for the input@NotNull public java.util.List<Select.Option> getOptionSet()
public void setValueByText(@NotNull java.lang.String text)
text
- The text of the option to setjava.lang.IllegalArgumentException
- If no such text option was foundpublic void setSelectedIndex(int index)
index
- The index of the value to setjava.lang.ArrayIndexOutOfBoundsException
- If the given index is invalid@NotNull public java.lang.String toString()
toString
in class java.lang.Object