首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > Struts Bean验证适配器是JSR-303 Bean验证与Struts 1集成了一个简单的方法

Struts Bean验证适配器是JSR-303 Bean验证与Struts 1集成了一个简单的方法

资 源 简 介

After applying the JSR-303 Bean Validation annotations to your Struts ActionForm subclass, performing a JSR-303 bean validation is just making a simple call in your ActionForm validate method as shown below when using sbva: ``` import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import com.googlecode.sbva.DefaultStrutsBeanValidationAdapter; import com.mycompany.Minimal; import com.mycompany.SecondStep; public class UserForm extends ActionForm { private static DefaultStrutsBeanValidationAdapter beanValidationToStrutsConverter = new DefaultStrutsBeanValidationAdapter(); ... @NotNull(groups = Minimal.class) @Size(max=50, groups=FirstStep.class) private String street1; @NotNull(groups=SecondStep.class) private String city

文 件 列 表

sbva-1.0.5
examples
javadoc
lib
LICENSE-2.0.txt
README.txt
sbva.jar
sbva.src.zip
VIP VIP
0.211036s