当用户决定将表单中的字段留空时,Apache Struts 会将空绑定String为ActionForm. 有什么方法可以全局修改行为并选择null而不是空String?
String
ActionForm
null
我知道 Spring MVC 的做法完全相同,但还有StringTrimmerEditor可以注册为属性编辑器以将字符串修剪为null.
java web-applications struts-1
java ×1
struts-1 ×1
web-applications ×1