Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Primefaces inputNumber emptyValue=";“空的”;不是空的_Primefaces_Jsf 2 - Fatal编程技术网

Primefaces inputNumber emptyValue=";“空的”;不是空的

Primefaces inputNumber emptyValue=";“空的”;不是空的,primefaces,jsf-2,Primefaces,Jsf 2,JSF2.2 Primefaces 6.0 p:inputNumber的“emptyValue”属性看起来很简单,但它不起作用 <p:inputNumber id="wsMaxInput" emptyValue="empty" value="#{officeResults.wsCountMax}" maxValue="3000" minValue="0" styleClass="ondInput" /> 它不仅看起来不是空的(我不确定从这里附加图片

JSF2.2 Primefaces 6.0

p:inputNumber的“emptyValue”属性看起来很简单,但它不起作用

   <p:inputNumber id="wsMaxInput" emptyValue="empty"
      value="#{officeResults.wsCountMax}" maxValue="3000"
      minValue="0" styleClass="ondInput" />

它不仅看起来不是空的(我不确定从这里附加图片是否有效),而且当我点击“提交”时,当它应该为空时,该值被设置为零


这个组件缺少什么?

问题可能是
minValue=“0”
的问题,因为它会将值重置为
0
!检查你的背景。。。
#{officeResults.wsCountMax}
是整数吗?我有99.9%的把握:OfficeResults.java可能重复:“私有整数wsCountMax”。当我删除minValue=“0”时,它将填充“0.00”。所以这两条评论都不适用。我会继续挖掘。事实上,当我有两个组件同时存在wsCountMin和wsCountMax时,我有一个emptyValue=“zero”和一个emptyValue=“empty”,它们都用“0.00”填充