page:
<@s.submit value="保存为草稿" method="saveDraftOrder" cssClass="btn_w65px"/>
<@s.submit value="提交" method="saveFormalOrder" cssClass="btn_w65px"/>
xml:
validation-name:
ProductOrderAction-saveDraftOrder-validation.xml
ProductOrderAction-saveFormalOrder-validation.xml
ClassName:
ProductOrderAction.java
我要验证 ProductOrderAction 的 saveDraftOrder && saveFormalOrder 方法
配置文件不起作用。
自己search 了一下 官网上这样说 貌似对我这个没什么用。。。
- To use a postfix wildcard, just move the asterisk and add an underscore.
- From the framework's perspective, a wildcard mapping creates a new "virtual" mapping with all the same
- attributes as a conventional, static mapping. As a result, you can use the expanded wildcard name as the name
- of validation, type conversion, and message resource files, just as if it were an Action name (which it is!).
- Crud_input-validation.xml
- Crud_delete-conversion.xml
:oops: 。请各位赐教下。。感激万分!
怎么没人理。。。。
[b]问题补充:[/b]
配置没有问题,action 里的方法可以运行
只是 验证规则没有执行
我估计是提交方式 的问题
ps:我是用相同的action name 但是method 不同