use of com.ibm.icu.text.DecimalFormatSymbols in project head by mifos.
the class MifosNumberFormattingInfoTag method doStartTag.
@Override
public int doStartTag() throws JspException {
try {
Locale locale = LabelTagUtils.getInstance().getUserPreferredLocale();
DecimalFormat decimalFormat = getDecimalFormat(locale);
DecimalFormatSymbols symbols = decimalFormat.getDecimalFormatSymbols();
StringBuilder sb = new StringBuilder();
sb.append("<span id=\"format.decimalSeparator\" title=\"").append(symbols.getDecimalSeparator()).append("\"></span>\n");
sb.append("<span id=\"format.groupingSeparator\" title=\"").append(symbols.getGroupingSeparator()).append("\"></span>\n");
sb.append("<span id=\"format.groupingSize\" title=\"").append(decimalFormat.getGroupingSize()).append("\"></span>\n");
pageContext.getOut().print(sb.toString());
} catch (Exception ex) {
throw new JspException("NumberFormattingInfoTag: " + ex.getMessage());
}
return SKIP_BODY;
}
Aggregations