org.apache.shale.validator.converter
Class AbstractConverter
java.lang.Object
org.apache.shale.validator.util.AbstractUtilities
org.apache.shale.validator.converter.AbstractConverter
- All Implemented Interfaces:
- javax.faces.component.StateHolder, javax.faces.convert.Converter
- Direct Known Subclasses:
- DoubleConverter, FloatConverter, IntegerConverter, LongConverter, ShortConverter
public abstract class AbstractConverter
- extends AbstractUtilities
- implements javax.faces.convert.Converter
Abstract base class for converters that use Apache Commons Validator
as their foundation.
|
Method Summary |
abstract 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. |
abstract 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConverter
public AbstractConverter()
getAsObject
public abstract 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.
- Specified by:
getAsObject in interface javax.faces.convert.Converter
- Parameters:
context - FacesContext for the current requestcomponent - UIComponent associated with the
value to be convertedvalue - String value to be converted
- Throws:
ConverterException - if conversion cannot be successfully
performed
NullPointerException - if context or
component is null
getAsString
public abstract 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.
- Specified by:
getAsString in interface javax.faces.convert.Converter
- Parameters:
context - FacesContext for the current requestcomponent - UIComponent associated with the
model data object to be convertedvalue - Model data object to be converted
- Throws:
ConverterException - if conversion cannot be successfully
performed
NullPointerException - if context or
component is null
Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.