...
To use these annotations, you have to specify the AnnotationWorkflowInterceptor to your interceptor stack.
Annotation | Description |
---|---|
Marks a action method that needs to be executed before the result. | |
Marks a action method that needs to be executed before the main action method. | |
Marks a action method that needs to be executed before the result. |
...
If you want to use annotation based validation, you have to annotate the class or interface with Validation Annotation.
These are the standard validator annotations that come with XWork-tiger:
Annotation | Description |
---|---|
Checks if there are any conversion errors for a field. | |
Checks that a date field has a value within a specified range. | |
Checks that a double field has a value within a specified range. | |
Checks that a field is a valid e-mail address. | |
Validates an expression. | |
Uses an OGNL expression to perform its validator. | |
Checks that a numeric field has a value within a specified range. | |
Validates a regular expression for a field. | |
Checks that a field is non-null. | |
Checks that a String field is not empty. | |
Checks that a String field is of the right length. | |
| |
Checks that a field is a valid URL. | |
Marker annotation for validation at Type level. | |
Used to group validation annotations. | |
| |
Use this annotation for your custom validator types. |
...
In short, instead of specifying the types found in collections and maps as documented in Type Conversion, the collection's generic type is used. This means you most likely don't need any ClassName-conversion.properties files.
If you want to use annotation based type conversion, you have to annotate the class or interface with the Conversion Annotation.
Annotation | Description |
---|---|
Marker annotation for type conversions at Type level. | |
For Collection and Map types: Create the types within the Collection or Map, if null. | |
For Generic types: Specify the element type for Collection types and Map values. | |
For Generic types: Specify the key type for Map keys. | |
For Generic types: Specify the key property name value. | |
Used for class and application wide conversion rules. |
...