Law*_*ney 11 java spring-webflow
在Spring Webflow 2.0.x的上下文中......
我处理表单绑定"typemismatches",即尝试将String映射到Integer字段,通过在我的使用中使用以下内容 messages.properties
typeMismatch={0} contains invalid data.
Run Code Online (Sandbox Code Playgroud)
这很好用.
The problem is that if the field that the typeMismatch error occurred on was "required" then I also receive an error for the missing required field, which is logical I guess because the value that was submitted was never bound. ("Required" being defined in a Commons Validation XML file)
So, I dont want to see the "XXX is required field" error message when the field is only missing due to the typeMismatch. How do I resolve this? I thought about overriding initBinder() on the FormAction but quickly got nowhere.....
| 归档时间: |
|
| 查看次数: |
2926 次 |
| 最近记录: |