try
{
String format = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DoubleFormat", null, facesContext.getViewRoot().getLocale());
DecimalFormat numberFormat = new DecimalFormat(format);
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
dfs.setDecimalSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_DecimalSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
dfs.setGroupingSeparator(MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "Application_GroupingSeparator", null, facesContext.getViewRoot().getLocale()).charAt(0));
numberFormat.setDecimalFormatSymbols(dfs);
return new Double(numberFormat.parse(str).doubleValue());
}