WebWork/XWork对J2SE 5的支持项目

原文参考: http://wiki.opensymphony.com/display/WW/J2SE+5+Support

(注:原文随时更新,请以原文为主)

XWork对J2SE5的支持目前还在测试阶段,是通过一个xwork-tiger 子项目来提供的.目前,在这个项目里对Java 5的实现是Map和Collection的范型支持.

简单的说,代替在类型转换文档里指定在Collections和maps里的类型的方法,目前可以使用范型来指定.这意味着你不在需要ClassName-conversion.properties文件.


目前支持的标注Annotations有三大类型.

Interceptor Annotations 拦截器标注

Annotation

Description

After Annotation 标注一个在action方法之后执行的方法.
Before Annotation 标注一个在action方法之前执行的方法.
BeforeResult Annotation 标注一个在返回结果之前执行的方法.

Validation Annotations 校验标注

如果你要标注基本的校验器,你需要使用Validation Annotation来标注类或者接口.

这些是包含在本项目里面的标准支持的校验器标注:

Annotation

Description

ConversionErrorFieldValidator Annotation  转换错误
DateRangeFieldValidator Annotation  日期范围
EmailValidator Annotation  邮件
ExpressionValidator Annotation  表达式
FieldExpressionValidator Annotation  字段表达式
IntRangeFieldValidator Annotation  整数范围
RegexFieldValidator Annotation  正则表达式
RequiredFieldValidator Annotation  必须字段
RequiredStringValidator Annotation  必须字符串
StringLengthFieldValidator Annotation  字符串长度
StringRegexValidator Annotation  字符串正则表达式
UrlValidator Annotation  Url
Validation Annotation Marker annotation for validation at Type level.
Validations Annotation Used to group validation annotations.
VisitorFieldValidator Annotation  

Type Conversion Annotations 类型转换标注

如果你要标注基本的类型转换,请使用Conversion Annotation来给接口或者类做标注.

Annotation

Description

Conversion Annotation Marker annotation for type conversions at Type level.
KeyProperty Annotation  
TypeConversion Annotation Used for class and application wide conversion rules.

 

其他内容以及各个标注的使用说明请看原文吧 :)

:项目下载和源码目前都包含在xwork的cvs上. webwork的lib目录下也有.

posted on 2005-12-13 22:59 Scud(飞云小侠) 阅读(3066) 评论(0)  编辑  收藏 所属分类: WEB


只有注册用户登录后才能发表评论。


网站导航:
 
<2005年12月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

导航

统计

公告

文章发布许可
创造共用协议:署名,非商业,保持一致

我的邮件
cnscud # gmail


常用链接

留言簿(15)

随笔分类(113)

随笔档案(103)

相册

友情链接

技术网站

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜