Class AbstractForm
java.lang.Object
name.matthewgreet.strutscommons.form.AbstractForm
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NullForm
Template for Struts 2 forms that receives form data.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
doValidate
(com.opensymphony.xwork2.interceptor.ValidationAware validationAware, com.opensymphony.xwork2.TextProvider textProvider) Validates and parses form data itself, such as required fields or date validation, writing any error or field messages to the ValidationAware message receiver.protected abstract void
Sets all displayed fields to default values for data entry of a new record, which is usually an empty string.
-
Constructor Details
-
AbstractForm
public AbstractForm()
-
-
Method Details
-
resetFields
protected abstract void resetFields()Sets all displayed fields to default values for data entry of a new record, which is usually an empty string. -
doValidate
public abstract void doValidate(com.opensymphony.xwork2.interceptor.ValidationAware validationAware, com.opensymphony.xwork2.TextProvider textProvider) Validates and parses form data itself, such as required fields or date validation, writing any error or field messages to the ValidationAware message receiver. Any error message indicates a failure.- Parameters:
validationAware
- Error message receiver, usually the calling action.textProvider
- Message name translator that generates localised text, if this is set up. This is usually ignored as no localisation is set up.
-