Package webwork.action
Class ValidationEditorSupport
java.lang.Object
java.beans.PropertyEditorSupport
webwork.action.ValidationEditorSupport
- All Implemented Interfaces:
PropertyEditor
- Direct Known Subclasses:
BigDecimalEditor,BooleanEditor,BooleanObjectEditor,ByteEditor,ByteObjectEditor,DateEditor,DateFormatEditor,DoubleEditor,DoubleObjectEditor,FloatEditor,FloatObjectEditor,IntegerEditor,IntegerObjectEditor,LongEditor,LongObjectEditor,ShortEditor,ShortObjectEditor,StringEditor
This is a useful base class for JavaBeans property editors whose main purpose is to provide validation of form input
parameters.
Overriding setAsText is sufficient. Do whatever validation you need and throw IllegalArgumentException if something
is wrong. If all is ok then set the protected attribute "value" to the converted value (may be a string).
- Version:
- $Revision: 1.6 $
- Author:
- Rickard Öberg (rickard@middleware-company.com)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
-
Field Details
-
value
-
-
Constructor Details
-
ValidationEditorSupport
public ValidationEditorSupport()
-
-
Method Details
-
setValue
- Specified by:
setValuein interfacePropertyEditor- Overrides:
setValuein classPropertyEditorSupport
-
getAsText
- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-
getAsText
This method is specified in the FastPropertyEditor interface and it is implemented here for convenience -
setAsText
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport
-
getValue
- Specified by:
getValuein interfacePropertyEditor- Overrides:
getValuein classPropertyEditorSupport
-