double - JSF f:convertNumber round up currency -


is possible use f:convertnumber round up? checked the api here , didn't mention rounding. if not, next best thing convert double $ value while rounding up?

<f:convertnumber maxfractiondigits="2" groupingused="true" currencysymbol="$" maxintegerdigits="7" type="currency" /> 

ex: $1.104999 should become $1.11

this works specific case. have other edge cases break?

first, round in java class:

private double roundcost(double cost) {     return (math.ceil(cost*100))/100; } 

then past f:convertnumber.

i'm open other suggestions.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -