【发布时间】:2011-08-31 04:34:39
【问题描述】:
我有一个支持 bean,其中 fileld 为 Long 、 Double 、 Integer 、 String 当我没有在输入字段中指定任何内容时,它会将 Long、Integer 和 Double 设为零,而不是 null。我正在使用 tomcat 部署我的应用程序。有什么解决办法吗?我尝试了以下上下文参数,但它不起作用。
<context-param>
<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
<param-value>true</param-value>
</context-param>
【问题讨论】: