|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.convert.NumberConverter com.ibm.xsp.convert.NumberConverter
public class NumberConverter
The xp:convertNumber
tag extends the default number converter.
Field Summary | |
---|---|
static java.lang.String |
CONVERTER_ID
The converter id for this converter. |
Constructor Summary | |
---|---|
NumberConverter()
|
Method Summary | |
---|---|
protected javax.faces.convert.Converter |
createConverter(javax.faces.context.FacesContext context,
java.lang.Class<?> resultType)
When converting to a new type, gets the appropriate converter or catches any conversion errors. |
protected java.lang.Object |
decodeCurrencyCode(javax.faces.context.FacesContext context,
java.lang.String valueStr)
|
protected java.lang.String |
decodeExtensionPatternValue(javax.faces.context.FacesContext context,
java.lang.String value)
Removes the IBM pattern extension characters from the value. |
protected java.lang.String |
encodeCurrencyCode(java.lang.Object value)
|
protected java.lang.String |
encodeExtensionPatternValue(java.lang.Object value,
java.lang.String objectAsString)
Adds the IBM pattern extension characters to the value. |
java.lang.String |
generateClientSideConverter(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Generate client side conversion. |
java.lang.Object |
getAsObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String value)
Return value as an object |
java.lang.String |
getAsString(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
Return value as a string |
protected char |
getDecimalSeparator()
Return character used as decimal separator |
java.util.Locale |
getLocale()
Return the Locale to be used when parsing or formatting numbers. |
java.lang.String |
getPatternExtension()
Return the pattern extension |
protected char |
getThousandSeparator()
Return character used as thousand separator |
protected boolean |
isCurrencyCodeSet()
Return true if the currency code has been set using setCurrencyCode(String) |
protected boolean |
isCurrencySymbolSet()
Return true if the currency symbol has been set using setCurrencySymbol(String) |
protected boolean |
isGroupingUsedSet()
Return true if grouping separators has been set using setGroupingUsed(boolean) |
protected boolean |
isIntegerOnlySet()
Return true if integer only has been set using setIntegerOnly(boolean) |
protected boolean |
isLocaleSet()
Return true if locale has been set using setLocale(Locale) |
protected boolean |
isMaxFractionDigitsSet()
Return true if the maximum number of digits (formatted within a fraction) has been set using setMaxFractionDigits(int) |
protected boolean |
isMaxIntegerDigitsSet()
Return true if the maximum number of digits (formatted within a integer) has been set using setMaxIntegerDigits(int) |
protected boolean |
isMinFractionDigitsSet()
Return true if the minimum number of digits (formatted within a fraction) has been set using setMinFractionDigits(int) |
protected boolean |
isMinIntegerDigitsSet()
Return true if the minimum number of digits (formatted within a integer) has been set using setMinIntegerDigits(int) |
protected boolean |
isPatternExtensionSet()
Return true if the pattern extension has been set using setPatternExtension(String) |
protected boolean |
isPatternSet()
Return true if the user-defined numeric pattern has been set using setPattern(String) |
protected boolean |
isTypeSet()
Return true if the number type has been set using setType(String) |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setCurrencyCode(java.lang.String currencyCode)
Specifies the currency code to use when converting the value to a currency format. |
void |
setCurrencySymbol(java.lang.String currencySymbol)
Specifies the currency symbol to use when formatting currencies. |
void |
setGroupingUsed(boolean groupingUsed)
Specifies whether the converted value will contain grouping separators |
void |
setIntegerOnly(boolean integerOnly)
Specifies whether only the integer part of the value string will be formatted and parsed, regardless of data type |
void |
setLocale(java.util.Locale locale)
Specifies a locale to use when formatting and parsing styles for numbers. |
void |
setMaxFractionDigits(int maxFractionDigits)
Specifies the maximum number of digits that will be formatted in the fractional portion of the number |
void |
setMaxIntegerDigits(int maxIntegerDigits)
Specifies the maximum number of digits that will be formatted in the integer portion of the number |
void |
setMinFractionDigits(int minFractionDigits)
Specifies the minimum number of digits that will be formatted in the fractional portion of the number |
void |
setMinIntegerDigits(int minIntegerDigits)
Specifies the minimum number of digits that will be formatted in the integer portion of the number |
void |
setPattern(java.lang.String pattern)
Specifies the user-defined pattern that determines how the number string should be formatted and parsed. |
void |
setPatternExtension(java.lang.String patternExtension)
Set the pattern extension |
void |
setType(java.lang.String type)
Specifies how the number string will be formatted and parsed. |
Methods inherited from class javax.faces.convert.NumberConverter |
---|
getCurrencyCode, getCurrencySymbol, getMaxFractionDigits, getMaxIntegerDigits, getMinFractionDigits, getMinIntegerDigits, getPattern, getType, isGroupingUsed, isIntegerOnly, isTransient, setTransient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONVERTER_ID
Constructor Detail |
---|
public NumberConverter()
Method Detail |
---|
public java.lang.String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
getAsString
in interface javax.faces.convert.Converter
getAsString
in class javax.faces.convert.NumberConverter
public java.lang.Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String value)
getAsObject
in interface javax.faces.convert.Converter
getAsObject
in class javax.faces.convert.NumberConverter
public java.lang.String generateClientSideConverter(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
ClientSideConverter
generateClientSideConverter
in interface ClientSideConverter
java.io.IOException
protected char getDecimalSeparator()
protected char getThousandSeparator()
protected boolean isPatternExtensionSet()
setPatternExtension(String)
public java.lang.String getPatternExtension()
public void setPatternExtension(java.lang.String patternExtension)
public java.util.Locale getLocale()
setLocale(Locale)
, the root component locale is returned.
getLocale
in class javax.faces.convert.NumberConverter
public void setCurrencyCode(java.lang.String currencyCode)
setCurrencyCode
in class javax.faces.convert.NumberConverter
public void setCurrencySymbol(java.lang.String currencySymbol)
setCurrencySymbol
in class javax.faces.convert.NumberConverter
public void setGroupingUsed(boolean groupingUsed)
setGroupingUsed
in class javax.faces.convert.NumberConverter
public void setIntegerOnly(boolean integerOnly)
setIntegerOnly
in class javax.faces.convert.NumberConverter
public void setLocale(java.util.Locale locale)
setLocale
in class javax.faces.convert.NumberConverter
public void setMaxFractionDigits(int maxFractionDigits)
setMaxFractionDigits
in class javax.faces.convert.NumberConverter
public void setMaxIntegerDigits(int maxIntegerDigits)
setMaxIntegerDigits
in class javax.faces.convert.NumberConverter
public void setMinFractionDigits(int minFractionDigits)
setMinFractionDigits
in class javax.faces.convert.NumberConverter
public void setMinIntegerDigits(int minIntegerDigits)
setMinIntegerDigits
in class javax.faces.convert.NumberConverter
public void setPattern(java.lang.String pattern)
setPattern
in class javax.faces.convert.NumberConverter
public void setType(java.lang.String type)
setType
in class javax.faces.convert.NumberConverter
protected boolean isCurrencyCodeSet()
setCurrencyCode(String)
protected boolean isCurrencySymbolSet()
setCurrencySymbol(String)
protected boolean isGroupingUsedSet()
setGroupingUsed(boolean)
protected boolean isIntegerOnlySet()
setIntegerOnly(boolean)
protected boolean isLocaleSet()
setLocale(Locale)
protected boolean isMaxFractionDigitsSet()
setMaxFractionDigits(int)
protected boolean isMaxIntegerDigitsSet()
setMaxIntegerDigits(int)
protected boolean isMinFractionDigitsSet()
setMinFractionDigits(int)
protected boolean isMinIntegerDigitsSet()
setMinIntegerDigits(int)
protected boolean isPatternSet()
setPattern(String)
protected boolean isTypeSet()
setType(String)
protected java.lang.String decodeExtensionPatternValue(javax.faces.context.FacesContext context, java.lang.String value)
protected javax.faces.convert.Converter createConverter(javax.faces.context.FacesContext context, java.lang.Class<?> resultType)
protected java.lang.String encodeCurrencyCode(java.lang.Object value)
protected java.lang.Object decodeCurrencyCode(javax.faces.context.FacesContext context, java.lang.String valueStr)
protected java.lang.String encodeExtensionPatternValue(java.lang.Object value, java.lang.String objectAsString)
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.convert.NumberConverter
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.convert.NumberConverter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |