org.jreform.internal
Class InputImpl<T>
java.lang.Object
org.jreform.internal.AbstractInputControl<T>
org.jreform.internal.InputImpl<T>
- All Implemented Interfaces:
- Input<T>, InputControl<T>, MessageOnError
- Direct Known Subclasses:
- CheckboxImpl, RadioImpl, SelectImpl
class InputImpl<T>
- extends AbstractInputControl<T>
- implements Input<T>
- Author:
- armandino (at) gmail.com
Method Summary |
String |
getStringValue()
Returns the string representation of the value as returned
by getValue().toString() or an empty string if the
value is null . |
T |
getValue()
Returns this input's value. |
String |
getValueAttribute()
Returns the value attribute or an empty string
if it's null . |
void |
setValue(T value)
Sets this input's value. |
void |
setValueAttribute(String input)
Sets this input's value attribute. |
String |
toString()
|
(package private) boolean |
validate(javax.servlet.http.HttpServletRequest req)
Validates this input's value attribute(s). |
Methods inherited from class org.jreform.internal.AbstractInputControl |
getCriteria, getInputName, getOnError, getType, isGroupInput, isRequired, isValid, setGroupInput, setOnError, setRequired, setValid |
value
private T value
valueAttribute
private String valueAttribute
InputImpl
InputImpl(InputDataType<T> type,
String name,
Criterion<T>... criteria)
getValue
public final T getValue()
- Description copied from interface:
Input
- Returns this input's value.
- Specified by:
getValue
in interface Input<T>
setValue
public final void setValue(T value)
- Description copied from interface:
Input
- Sets this input's value.
- Specified by:
setValue
in interface Input<T>
getValueAttribute
public final String getValueAttribute()
- Returns the value attribute or an empty string
if it's
null
.
- Specified by:
getValueAttribute
in interface Input<T>
setValueAttribute
public final void setValueAttribute(String input)
- Description copied from interface:
Input
- Sets this input's value attribute.
- Specified by:
setValueAttribute
in interface Input<T>
getStringValue
public final String getStringValue()
- Returns the string representation of the value as returned
by getValue().toString() or an empty string if the
value is
null
.
- Specified by:
getStringValue
in interface InputControl<T>
validate
boolean validate(javax.servlet.http.HttpServletRequest req)
- Description copied from class:
AbstractInputControl
- Validates this input's value attribute(s).
- Specified by:
validate
in class AbstractInputControl<T>
toString
public final String toString()
- Overrides:
toString
in class Object
Copyright © 2007-2008
jReform