formatters.put("currencyLong", BigDecimalMoneyFormatter.formattersByCurrencyWithSuffix());
// Because of component dependency, we cannot reference the money formatter
// directly. Instead, it is registered dynamically. If none has been register,
// we fallback to old questionable formatting.
FormatterFactory moneyFactory = getFormatterFactoryForType(MoneyFormatterKey);
if (moneyFactory != null) {
Object canonicalFmt = moneyFactory.getCanonicalFormatterForType(locale);
Object objectFmt = moneyFactory.getObjectFormatterForType(locale);
formatters.put(MoneyFormatterKey, objectFmt);
xml.put(MoneyFormatterKey, new PipedFormatter(canonicalFmt, objectFmt));
}
else {
// Object money = new AWVBigDecimalFormatter("$#,###.##", 2, locale);