|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.commons.converter.ConverterBase
org.apache.myfaces.commons.converter.AbstractTypedNumberConverter
@JSFConverter(name="mcc:convertNumber", clazz="org.apache.myfaces.commons.converter.TypedNumberConverter", tagClass="org.apache.myfaces.commons.converter.TypedNumberConverterTag", tagHandler="org.apache.myfaces.commons.converter.TypedNumberConverterTagHandler") public abstract class AbstractTypedNumberConverter
Converter which uses either the manually set destType
or the value binding to determine the
correct destination type to convert the number to
This tag creates a number formatting converter and associates it with the nearest
parent UIComponent. It uses either the manually set destType or the value
binding to determine the correct destination type to convert the number to.
Unless otherwise specified, all attributes accept static values or EL expressions.
Field Summary | |
---|---|
static java.lang.String |
CONVERTER_ID
|
Constructor Summary | |
---|---|
AbstractTypedNumberConverter()
|
Method Summary | |
---|---|
java.lang.Object |
_getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.String value)
|
void |
_restoreState(javax.faces.context.FacesContext facesContext,
java.lang.Object state)
|
java.lang.Object |
_saveState(javax.faces.context.FacesContext facesContext)
|
java.lang.Object |
getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.String value)
|
java.lang.String |
getAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Object value)
|
java.lang.String |
getCurrencyCode()
ISO 4217 currency code |
java.lang.String |
getCurrencySymbol()
The currency symbol used to format a currency value. |
java.lang.Class |
getDestType()
The java class name the value should be converted to. |
protected java.lang.String |
getLocalCurrencyCode()
|
java.lang.String |
getLocalCurrencySymbol()
|
java.util.Locale |
getLocale()
The name of the locale to be used, instead of the default as specified in the faces configuration file. |
abstract java.lang.Integer |
getMaxFractionDigits()
The maximum number of digits in the fractional portion of the number. |
abstract java.lang.Integer |
getMaxIntegerDigits()
The maximum number of digits in the integer portion of the number. |
abstract java.lang.Integer |
getMinFractionDigits()
The minimum number of digits in the fractional portion of the number. |
abstract java.lang.Integer |
getMinIntegerDigits()
The minimum number of digits in the integer portion of the number. |
abstract java.lang.String |
getPattern()
A custom Date formatting pattern, in the format used by java.text.SimpleDateFormat. |
abstract java.lang.String |
getType()
The type of formatting/parsing to be performed. |
abstract boolean |
isGroupingUsed()
Specifies whether output will contain grouping separators. |
abstract boolean |
isIntegerOnly()
Specifies whether only the integer part of the input will be parsed. |
boolean |
isTransient()
|
void |
restoreState(javax.faces.context.FacesContext facesContext,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext facesContext)
|
void |
setCurrencyCode(java.lang.String currencyCode)
|
void |
setCurrencySymbol(java.lang.String currencySymbol)
|
void |
setDestType(java.lang.Class destType)
|
void |
setLocale(java.util.Locale locale)
|
void |
setTransient(boolean aTransient)
|
Methods inherited from class org.apache.myfaces.commons.converter.ConverterBase |
---|
getDetailMessage, getFacesContext, getFacesMessage, getStringValue, getSummaryMessage, getValueBinding, restoreAttachedState, saveAttachedState, setDetailMessage, setSummaryMessage, setValueBinding |
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 AbstractTypedNumberConverter()
Method Detail |
---|
public java.lang.Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, java.lang.String value)
public void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class ConverterBase
public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
saveState
in interface javax.faces.component.StateHolder
saveState
in class ConverterBase
@JSFProperty public java.lang.Class getDestType()
public void setDestType(java.lang.Class destType)
public java.lang.Object _getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, java.lang.String value)
public java.lang.String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, java.lang.Object value)
public void _restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
public java.lang.Object _saveState(javax.faces.context.FacesContext facesContext)
@JSFProperty public java.lang.String getCurrencyCode()
protected java.lang.String getLocalCurrencyCode()
public void setCurrencyCode(java.lang.String currencyCode)
@JSFProperty public java.lang.String getCurrencySymbol()
public java.lang.String getLocalCurrencySymbol()
public void setCurrencySymbol(java.lang.String currencySymbol)
@JSFProperty(defaultValue="true") public abstract boolean isGroupingUsed()
@JSFProperty(defaultValue="false") public abstract boolean isIntegerOnly()
@JSFProperty public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
@JSFProperty public abstract java.lang.Integer getMaxFractionDigits()
@JSFProperty public abstract java.lang.Integer getMaxIntegerDigits()
@JSFProperty public abstract java.lang.Integer getMinFractionDigits()
@JSFProperty public abstract java.lang.Integer getMinIntegerDigits()
@JSFProperty public abstract java.lang.String getPattern()
public boolean isTransient()
isTransient
in interface javax.faces.component.StateHolder
isTransient
in class ConverterBase
public void setTransient(boolean aTransient)
setTransient
in interface javax.faces.component.StateHolder
setTransient
in class ConverterBase
@JSFProperty(defaultValue="number") public abstract java.lang.String getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |