Annotation Type Trim


Defines a form field value (whether on a Struts Action or model of ModelDriven Struts Action) should be trimmed using the String.trim() function. This is useful where users copy and paste values and inadvertently copy spaces.

This annotation applies an adjuster, which comes before validation and conversion, if any. It usually applies to single value fields but can apply to other kinds of field.

Applicable Field Types
Field type Converter type
Single value   Applied once to the single parameter value.
Array or collection Converter Applied to each parameter value.
Array or collection List converter Applied once to the single parameter value.