public String getLocale() { if (request.getLocale().getCountry() == null || request.getLocale().getCountry().trim().isEmpty()) { return String.format("%s", request.getLocale().getLanguage()); } else { return String.format( "%s-%s", request.getLocale().getLanguage(), request.getLocale().getCountry()); } }
private String getFormatedValue() { try { java.text.NumberFormat numberFormat = new DecimalFormat(mask, new DecimalFormatSymbols(request.getLocale())); return numberFormat.format(value); } catch (Exception e) { logger.error(e.getLocalizedMessage()); return value.toString(); } }