If I return an object with a currency field, and I'm returning it from a controller. If I use an <apex:inputField>
, the number is correctly formatted as 1,234.56
.
However, if I use an <apex:inputHidden>
, then the number will be returned as 1234.56
(without a thousand separator). I'd like to use that number to determine the current decimal separator dynamically (Javascript is used to perform some calculations).
Can I force the <apex:inputHidden>
to format the number? Alternatively, how can I determine the current user's local settings for number separators in a controller? UserInfo.getLocale
will get the locale. Is there an equivalent of DecimalFormat
for Apex?