我有一个显示 double 值的af:inputText
。例如:17555.8
<af:inputText value="#{bindings.regnum.inputValue}"
disabled="true"
simple="true" id="it4"/>
我想以整数形式查看此数据:17555。我怎样才能实现这一点?
最佳答案
尝试
<af:inputText value="#{bindings.regnum.inputValue}" disabled="true" simple="true" id="it4">
<af:convertNumber type="number" messageDetailConvertNumber="#"/>
</af:inputText>
有关convertNumber的更多信息here
关于java - 如何在 af :inputText rounded down to an integer? 中显示 double ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51134202/