public abstract class BaseFormattedNumberValidator extends BaseValidator
Modifier and Type | Field and Description |
---|---|
protected NumberFormat |
m_DecFormat |
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, EMPTY_MESSAGE_ID, m_bShowCAFErrorMsg, m_bTransient, m_clientLocale, m_CustomMessage, MIN_MAX_MESSAGE_ID, NULL_PATTERN_MESSAGE_ID, OVER_MAX_MESSAGE_ID, UNDER_MIN_MESSAGE_ID
NOT_IN_RANGE_MESSAGE_ID
Constructor and Description |
---|
BaseFormattedNumberValidator() |
Modifier and Type | Method and Description |
---|---|
protected String |
getFormatPattern(boolean positive) |
String |
getNegativePattern() |
String |
getNegativePrefixRegex() |
String |
getNegativeRegex()
Build RegEx for client-side validation
|
protected NumberFormat |
getNumberFormater(FacesContext context) |
String |
getPattern() |
String |
getPositivePattern() |
String |
getPositiveRegex()
Build RegEx for client-side validation
|
protected String |
getRegex(DecimalFormat decFmt,
boolean positive) |
void |
restoreState(FacesContext context,
Object state) |
Object |
saveState(FacesContext context) |
void |
setPattern(String sPattern) |
getClientLocale, getCustomErrorMsg, getRegionAsString, getshowCAFErrorMsg, isStringObj, isTransient, isValue, setCustomErrorMsg, setRegion, setshowCAFErrorMsg, setTransient, validate
protected String m_sPattern
protected NumberFormat m_DecFormat
public void setPattern(String sPattern)
public String getPattern()
protected NumberFormat getNumberFormater(FacesContext context)
public Object saveState(FacesContext context)
saveState
in interface StateHolder
saveState
in class BaseValidator
public void restoreState(FacesContext context, Object state)
restoreState
in interface StateHolder
restoreState
in class BaseValidator
public String getPositiveRegex()
public String getPositivePattern()
public String getNegativeRegex()
public String getNegativePattern()
protected String getFormatPattern(boolean positive)
public String getNegativePrefixRegex()
protected String getRegex(DecimalFormat decFmt, boolean positive)