Interface Form

All Known Subinterfaces:
FormattableForm
All Known Implementing Classes:
AbstractForm, AbstractFormattableForm, NullForm

public interface Form
Template defining class that receives form data for form driven Actions.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    manualParameterConvert(Map<String,String> unprocessedParameters, com.opensymphony.xwork2.interceptor.ValidationAware validationAware, com.opensymphony.xwork2.TextProvider textProvider)
    Sets, converts and validates form fields from unprocessed request parameters, writes any error messages, and returns the names of successfully processed parameters and unsuccessfully processed parameters.
    void
    Sets all displayed fields to default values for data entry of a new record, which is usually an empty string.
  • Method Details

    • resetFields

      void resetFields()
      Sets all displayed fields to default values for data entry of a new record, which is usually an empty string.
    • doValidate

      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.
    • manualParameterConvert

      ManualParameterConversionResult manualParameterConvert(Map<String,String> unprocessedParameters, com.opensymphony.xwork2.interceptor.ValidationAware validationAware, com.opensymphony.xwork2.TextProvider textProvider)

      Sets, converts and validates form fields from unprocessed request parameters, writes any error messages, and returns the names of successfully processed parameters and unsuccessfully processed parameters. Where multiple request parameters have the same name, only the first is presented.

      Unprocessed parameters are those that haven't set a form field for a number of reasons.

      • No form field has the same name.
      • Form field is annotated with ManualParameterConversion.
      • Form field is a non-string array type.
      • Form field is a non-string collection type without a converter annotation.