|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.validator.util.AbstractUtilities org.apache.shale.validator.converter.AbstractConverter org.apache.shale.validator.converter.LongConverter
public final class LongConverter
JavaServer Faces Converter
for Long (and int)
instances. Parsing and formatting is controlled by the properties
that are set on a Converter instance.
Field Summary |
---|
Fields inherited from class org.apache.shale.validator.util.AbstractUtilities |
---|
DEFAULT_RESOURCE_BUNDLE |
Constructor Summary | |
---|---|
LongConverter()
|
Method Summary | |
---|---|
Object |
getAsObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
String value)
Convert the specified string value, associated with the specified
|
String |
getAsString(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
Convert the specified model data object, associated with the
specified |
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. |
Methods inherited from class org.apache.shale.validator.util.AbstractUtilities |
---|
getMessage, isTransient, message, message, message, setMessage, setTransient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongConverter()
Method Detail |
---|
public 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.Converter
getAsObject
in class AbstractConverter
context
- 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.Converter
getAsString
in class AbstractConverter
context
- 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.StateHolder
restoreState
in class AbstractUtilities
public Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class AbstractUtilities
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |