public class CurrencyNumberConverter extends BaseConverter implements StateHolder
Modifier and Type | Field and Description |
---|---|
static String |
CONVERTER_ID |
protected NumberFormat |
m_DecFormat |
protected String |
m_sCurrencyCode |
protected String |
m_sPattern |
BAD_PARAMETER_LONG_ID, BAD_PARAMETER_SHORT_ID, BAD_STRING_LONG_ID, BAD_STRING_SHORT_ID, BAD_TYPE_LONG_ID, BAD_TYPE_SHORT_ID, m_bshowCAFErrorMsg, m_clientLocale, m_CustomMessage
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
Constructor and Description |
---|
CurrencyNumberConverter() |
getBadCommonInputMsg, getBadInputMsg, getBadInputMsg, getBadInputStringTypeMsg, getBadInputTypeMsg, getClientLocale, getClientTimeZone, getCustomErrorMsg, getshowCAFErrorMsg, isBlankValue, isStringObj, isValue, setCustomErrorMsg, setshowCAFErrorMsg, validateFromObject, validateFromString
public static final String CONVERTER_ID
protected String m_sPattern
protected NumberFormat m_DecFormat
protected String m_sCurrencyCode
public Object getAsObject(FacesContext context, UIComponent component, String value)
getAsObject
in interface Converter
@Deprecated public Number getNumber(String value, FacesContext context)
getNumber(String, Class, FacesContext)
insteadpublic Number getNumber(String value, Class<?> classType, FacesContext context)
public String getAsString(FacesContext context, UIComponent component, Object value)
getAsString
in interface Converter
public String getAsString(Object value, Class<?> classType, FacesContext context)
public void setPattern(String sPattern)
public String getPattern()
public void setRegion(String region)
BaseConverter
setRegion
in class BaseConverter
region
- the local object to use. Null will make the
locale use the session's locale.public String getRegion()
BaseConverter
getRegion
in class BaseConverter
public void setCurrencyCode(String sValue)
public String getCurrencyCode()
protected boolean isCurrency()
public Object saveState(FacesContext context)
saveState
in interface StateHolder
public void restoreState(FacesContext context, Object state)
restoreState
in interface StateHolder
public void setTransient(boolean bValue)
setTransient
in interface StateHolder
public boolean isTransient()
isTransient
in interface StateHolder
protected NumberFormat getNumberFormater(FacesContext context)