Annotations
This page last changed on Jan 17, 2007 by phil.
In many places, applications can use use Java 5 annotations as an alternative to XML and Java properties
configuration. This page serves as a reference for all annotations across the framework.
Interceptor Annotations
To use these annotations, you have to specify the AnnotationWorkflowInterceptor to your interceptor
stack.
Annotation Description
After Annotation Marks an action method that needs to be executed
after the main method and the result.
Before Annotation Marks an action method that needs to be executed
before the main action method.
BeforeResult Annotation Marks an action method that needs to be executed
before the result.
Validation Annotations
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
ConversionErrorFieldValidator Annotation Checks if there are any conversion errors for a
field.
DateRangeFieldValidator Annotation Checks that a date field has a value within a
specified range.
DoubleRangeFieldValidator Annotation Checks that a double field has a value within a
specified range.
EmailValidator Annotation Checks that a field is a valid e-mail address.
ExpressionValidator Annotation Validates an expression.
FieldExpressionValidator Annotation Uses an OGNL expression to perform its validator.
IntRangeFieldValidator Annotation Checks that a numeric field has a value within a
specified range.
RegexFieldValidator Annotation Validates a regular expression for a field.
RequiredFieldValidator Annotation Checks that a field is non-null.
Document generated by Confluence on Feb 16, 2007 07:19 Page 5
评论5
最新资源