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
Post a Comment