setConverterIdString(NumberConverter.CONVERTER_ID);
}
protected Converter createConverter() throws JspException
{
NumberConverter converter = (NumberConverter) super.createConverter();
ELContext elContext = FacesContext.getCurrentInstance().getELContext();
if (null != _currencyCode)
{
converter.setCurrencyCode(
(String) UIComponentELTagUtils.evaluateValueExpression(elContext, _currencyCode));
}
if (null != _currencySymbol)
{
converter.setCurrencySymbol(
(String) UIComponentELTagUtils.evaluateValueExpression(elContext, _currencySymbol));
}
if (null != _groupingUsed)
{
converter.setGroupingUsed(UIComponentELTagUtils.getBooleanValue(elContext, _groupingUsed));
} else
{
converter.setGroupingUsed(true);
}
if (null != _integerOnly)
{
converter.setIntegerOnly(UIComponentELTagUtils.getBooleanValue(elContext, _integerOnly));
} else
{
converter.setIntegerOnly(false);
}
if (null != _locale)
{
Locale locale;
if (_locale.isLiteralText())
{
locale = new Locale(_locale.getExpressionString());
} else
{
locale = (Locale) _locale.getValue(elContext);
if (null == locale)
{
locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
}
}
converter.setLocale(locale);
}
if (null != _maxFractionDigits)
{
converter.setMaxFractionDigits(UIComponentELTagUtils.getIntegerValue(elContext, _maxFractionDigits));
}
if (null != _maxIntegerDigits)
{
converter.setMaxIntegerDigits(UIComponentELTagUtils.getIntegerValue(elContext, _maxIntegerDigits));
}
if (null != _minFractionDigits)
{
converter.setMinFractionDigits(UIComponentELTagUtils.getIntegerValue(elContext, _minFractionDigits));
}
if (null != _minIntegerDigits)
{
converter.setMinIntegerDigits(UIComponentELTagUtils.getIntegerValue(elContext, _minIntegerDigits));
}
if (null != _pattern)
{
converter.setPattern((String) UIComponentELTagUtils.evaluateValueExpression(elContext, _pattern));
}
if (null != _type)
{
converter.setType((String) UIComponentELTagUtils.evaluateValueExpression(elContext, _type));
} else
{
converter.setType("number");
}
return converter;
}