public final class ShortConverter extends AbstractConverter
JavaServer Faces Converter for Short (and int)
instances. Parsing and formatting is controlled by the properties
that are set on a Converter instance.
DEFAULT_RESOURCE_BUNDLE| Constructor and Description |
|---|
ShortConverter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAsObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String value)
Convert the specified string value, associated with the specified
UIComponent, into a corresponding model data object. |
String |
getAsString(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
Convert the specified model data object, associated with the
specified
UIComponent, into a string suitable for rendering. |
Locale |
getLocale()
Return the
Locale to apply to this conversion, or
null to use the Locale for the current view. |
String |
getPattern()
Return the
java.text.NumberFormat pattern to apply
to this conversion, or null for using no pattern. |
void |
restoreState(javax.faces.context.FacesContext context,
Object state) |
Object |
saveState(javax.faces.context.FacesContext context) |
void |
setLocale(Locale locale)
Set the
Locale to apply to this conversion, or
null to use the Locale for the current view. |
void |
setPattern(String pattern)
Set the
java.text.NumberFormat pattern to apply to
this conversion, or null for using no pattern. |
getMessage, isTransient, message, message, message, setMessage, setTransientpublic Locale getLocale()
Return the Locale to apply to this conversion, or
null to use the Locale for the current view.
public void setLocale(Locale locale)
Set the Locale to apply to this conversion, or
null to use the Locale for the current view.
locale - The new Localepublic String getPattern()
Return the java.text.NumberFormat pattern to apply
to this conversion, or null for using no pattern.
public void setPattern(String pattern)
Set the java.text.NumberFormat pattern to apply to
this conversion, or null for using no pattern.
pattern - The new formatting patternpublic Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value)
Convert the specified string value, associated with the specified
UIComponent, into a corresponding model data object.
getAsObject in interface javax.faces.convert.ConvertergetAsObject in class AbstractConvertercontext - FacesContext for the current requestcomponent - UIComponent associated with the
value to be convertedvalue - String value to be convertedpublic String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value)
Convert the specified model data object, associated with the
specified UIComponent, into a string suitable for rendering.
getAsString in interface javax.faces.convert.ConvertergetAsString in class AbstractConvertercontext - FacesContext for the current requestcomponent - UIComponent associated with the
model data object to be convertedvalue - Model data object to be convertedpublic void restoreState(javax.faces.context.FacesContext context,
Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class AbstractUtilitiespublic Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class AbstractUtilitiesCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.