Reputation: 11
I have a problem with primefaces extensions about rounding numbers
From database the value is coming as 1.24569833 but on the screen the number is printed as 1.240000. But I want that the number is printed as 1.245700. Shortly I want to round the number coming from database 4 digits.
<pe:inputNumber
disabled="#{expenseBean.renderMode.currencyRateInputDisabled()}"
decimalPlaces="6"
rendered="#{!expenseBean.renderMode.kdvPanelRendered()}"
id="defaultCurrencyRate"
value="#{expenseBean.expense.selectedExpenseSpending.spendingCurrencyRate}">
I heard roundMethod attribute of inputNumber but that did not fix my problem. Can you help me?
Edit: InputNumber has been promoted to core PrimeFaces and is no longer in Extensions.
Upvotes: 0
Views: 1443
Reputation: 11
I found my mistake. The problem is version of the primefaces extensions. The old version is 0.4 , after updating it to 0.5.1 and also primefaces 3.3.1 or higher roundMethod is working.
Upvotes: 1