WebWork/XWork對J2SE 5的支持項目

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

          (注:原文隨時更新,請以原文為主)

          XWork對J2SE5的支持目前還在測試階段,是通過一個xwork-tiger 子項目來提供的.目前,在這個項目里對Java 5的實現(xiàn)是Map和Collection的范型支持.

          簡單的說,代替在類型轉(zhuǎn)換文檔里指定在Collections和maps里的類型的方法,目前可以使用范型來指定.這意味著你不在需要ClassName-conversion.properties文件.


          目前支持的標注Annotations有三大類型.

          Interceptor Annotations 攔截器標注

          Annotation

          Description

          After Annotation 標注一個在action方法之后執(zhí)行的方法.
          Before Annotation 標注一個在action方法之前執(zhí)行的方法.
          BeforeResult Annotation 標注一個在返回結(jié)果之前執(zhí)行的方法.

          Validation Annotations 校驗標注

          如果你要標注基本的校驗器,你需要使用Validation Annotation來標注類或者接口.

          這些是包含在本項目里面的標準支持的校驗器標注:

          Annotation

          Description

          ConversionErrorFieldValidator Annotation  轉(zhuǎn)換錯誤
          DateRangeFieldValidator Annotation  日期范圍
          EmailValidator Annotation  郵件
          ExpressionValidator Annotation  表達式
          FieldExpressionValidator Annotation  字段表達式
          IntRangeFieldValidator Annotation  整數(shù)范圍
          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 類型轉(zhuǎn)換標注

          如果你要標注基本的類型轉(zhuǎn)換,請使用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.

           

          其他內(nèi)容以及各個標注的使用說明請看原文吧 :)

          :項目下載和源碼目前都包含在xwork的cvs上. webwork的lib目錄下也有.

          posted on 2005-12-13 22:59 Scud(飛云小俠) 閱讀(3083) 評論(0)  編輯  收藏 所屬分類: WEB

          <2005年12月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統(tǒng)計

          公告

          文章發(fā)布許可
          創(chuàng)造共用協(xié)議:署名,非商業(yè),保持一致

          我的郵件
          cnscud # gmail


          常用鏈接

          留言簿(15)

          隨筆分類(113)

          隨筆檔案(103)

          相冊

          友情鏈接

          技術(shù)網(wǎng)站

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 华宁县| 西和县| 天台县| 游戏| 卫辉市| 孟州市| 罗江县| 威信县| 拜泉县| 永年县| 德令哈市| 定结县| 五莲县| 高邑县| 电白县| 霍林郭勒市| 莎车县| 江都市| 甘洛县| 灵台县| 漠河县| 株洲市| 丘北县| 乌海市| 吉林市| 江西省| 涡阳县| 东兴市| 绥江县| 萨嘎县| 龙里县| 潼关县| 重庆市| 三亚市| 嘉定区| 天津市| 连平县| 河津市| 德钦县| 漯河市| 泽库县|