Class SelectControl
java.lang.Object
org.xhtmlrenderer.simple.xhtml.controls.AbstractControl
org.xhtmlrenderer.simple.xhtml.controls.SelectControl
- All Implemented Interfaces:
FormControl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal String[]
int
getSize()
boolean
void
reset()
Reset the control to it's initial statevoid
setMultipleValues
(String[] values) Sets the control's current values (when isMultiple returns true).void
Sets the control's current value.private void
traverseOptions
(Element e, String prefix) Methods inherited from class org.xhtmlrenderer.simple.xhtml.controls.AbstractControl
addFormControlListener, collectText, fireChanged, fireEnabled, fireSuccessful, getElement, getForm, getInitialValue, getIntAttribute, getName, getValue, isEnabled, isHidden, isSuccessful, removeFormControlListener, setEnabled, setInitialValue, setSuccessful
-
Field Details
-
_size
private final int _size -
_multiple
private final boolean _multiple -
_values
-
_initialValue
-
_initialValues
-
_options
-
-
Constructor Details
-
SelectControl
-
-
Method Details
-
traverseOptions
-
getSize
public int getSize() -
isMultiple
public boolean isMultiple()- Specified by:
isMultiple
in interfaceFormControl
- Overrides:
isMultiple
in classAbstractControl
- Returns:
true
if this control accepts multiple values,false
otherwise
-
getOptions
-
setValue
Description copied from interface:FormControl
Sets the control's current value. This has no effect when isMultiple returns true.- Specified by:
setValue
in interfaceFormControl
- Overrides:
setValue
in classAbstractControl
-
getMultipleValues
- Specified by:
getMultipleValues
in interfaceFormControl
- Overrides:
getMultipleValues
in classAbstractControl
- Returns:
- the control's current values or
null
if isMultiple returns false
-
setMultipleValues
Description copied from interface:FormControl
Sets the control's current values (when isMultiple returns true). This has no effect when isMultiple returns false.- Specified by:
setMultipleValues
in interfaceFormControl
- Overrides:
setMultipleValues
in classAbstractControl
-
reset
public void reset()Description copied from interface:FormControl
Reset the control to it's initial state- Specified by:
reset
in interfaceFormControl
- Overrides:
reset
in classAbstractControl
-