You need to sign in to do that
Don't have an account?

Currency Formating VF Tag & Apex Decimal method
1. VF Tag Currency Formating - I'm using the following to format my currency, it works mostly fine, but in case of 0 values, it shows .00 instead of 0.00 - any suggestion ?
<apex:outputText value="{0,number, #,###,###.00}" >
<apex:param value="{!item.totalCost}" />
</apex:outputText>
2. Also curious, Decimal.SetScale(2, RoundingMode) rounds properly in controller , and I checked in view state, but when I show it in VF page, its chopping the last 0 for certain cases, ex:, 60.00 to 60.0 , anybody noticed this issue ?
Thanks
Ram
Try <apex:outputText value="{0,number, #,###,##0.00}" >
All Answers
Try <apex:outputText value="{0,number, #,###,##0.00}" >
Thanks Cory, it works. Just curious any reason why the controller rounding is dropped in VF page ?
Ram