Package org.xhtmlrenderer.simple.xhtml
Interface FormControl
- All Known Implementing Classes:
AbstractControl
,ButtonControl
,CheckControl
,HiddenControl
,SelectControl
,TextControl
public interface FormControl
Interface describing a form control.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFormControlListener
(FormControlListener listener) getForm()
String[]
getName()
getValue()
boolean
Is this control enabled?boolean
boolean
Is this control successful?void
removeFormControlListener
(FormControlListener listener) void
reset()
Reset the control to it's initial statevoid
setEnabled
(boolean enabled) Enable/disable this controlvoid
setMultipleValues
(String[] values) Sets the control's current values (when isMultiple returns true).void
setSuccessful
(boolean successful) Sets this control's successful state.void
Sets the control's current value.
-
Method Details
-
getElement
Element getElement()- Returns:
- the associated element
-
getForm
XhtmlForm getForm()- Returns:
- the associated form
-
addFormControlListener
-
removeFormControlListener
-
getName
String getName()- Returns:
- the name of the control
-
isEnabled
boolean isEnabled()Is this control enabled?- Returns:
true
if this control is enabled
-
setEnabled
void setEnabled(boolean enabled) Enable/disable this control -
getInitialValue
String getInitialValue()- Returns:
- the initial value
-
isSuccessful
boolean isSuccessful()Is this control successful?- Returns:
true
if this control is successful and its name-value pair should be submitted,false
otherwise.
-
isMultiple
boolean isMultiple()- Returns:
true
if this control accepts multiple values,false
otherwise
-
setSuccessful
void setSuccessful(boolean successful) Sets this control's successful state. -
getValue
String getValue()- Returns:
- the control's current value or
null
if isMultiple returns true
-
setValue
Sets the control's current value. This has no effect when isMultiple returns true. -
getMultipleValues
String[] getMultipleValues()- Returns:
- the control's current values or
null
if isMultiple returns false
-
setMultipleValues
Sets the control's current values (when isMultiple returns true). This has no effect when isMultiple returns false. -
reset
void reset()Reset the control to it's initial state
-