Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

f:convertNumber remove comma as thousand separator [duplicate]

I want to round value with four decimal places to one decimal place. That is why I use f:convertNumber:

<h:outputText value="${current.dayAverage.pressureRelative}" >      
    <f:convertNumber maxFractionDigits="1"/>
</h:outputText>

The rounding is done right, but the f:convertNumber adds thousand comma separator. I want to remove this separator but I don't know how. I am using Apache MyFaces 2.1 implementation. In the API for f:convertNumber it does not have any attribute to specify thousand separator. I suppose that this could be defined in locale attribute?

like image 380
Jernej Jerin Avatar asked Mar 21 '26 18:03

Jernej Jerin


1 Answers

You can remove the seperating commas by adding groupingUsed="false" to the f:convertNumber tag

like image 131
carrybagman Avatar answered Mar 25 '26 04:03

carrybagman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!