org.loom.converter
Class AbstractConverter
java.lang.Object
org.loom.converter.AbstractConverter
- All Implemented Interfaces:
- Converter, FormInputDecorator
- Direct Known Subclasses:
- AbstractAutocompletedConverter, AbstractStringConverter, InputStreamConverter, NullConverter, PersistentFileConverter
public abstract class AbstractConverter
- extends java.lang.Object
- implements Converter
|
Field Summary |
protected java.lang.Class<?> |
convertedClass
class of the values returned by this converter |
protected java.lang.String |
cssClass
the CSS class that should be added to any field linked to a property using this Converetr, null for none |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
convertedClass
protected java.lang.Class<?> convertedClass
- class of the values returned by this converter
cssClass
protected java.lang.String cssClass
- the CSS class that should be added to any field linked to a property using this Converetr, null for none
AbstractConverter
protected AbstractConverter(java.lang.Class<?> convertedClass)
getConvertedClass
public java.lang.Class<?> getConvertedClass()
- Specified by:
getConvertedClass in interface Converter
- Returns:
- the Class of the converted values.
getAsObject
public abstract java.lang.Object getAsObject(ParameterValue paramValue,
Messages messages,
MessagesRepository repository)
- Description copied from interface:
Converter
- Return the object value for the given text
- Specified by:
getAsObject in interface Converter
- Parameters:
paramValue - the value that is being parsed
- Returns:
- the parsed value (can be null), maybe ading new values to the errors array
setConvertedClass
public void setConvertedClass(java.lang.Class<?> convertedClass)
decorate
public void decorate(FormInputTag tag)
- Add CSS class extracted from this converter return type (number, string, file) to the tag.
- Specified by:
decorate in interface FormInputDecorator
getCssClass
public java.lang.String getCssClass()
setCssClass
public void setCssClass(java.lang.String cssClass)
The Loom Framework 1.6-SNAPSHOT.
Licensed under the Apache License, Version 2.0 by Extrema Sistemas de Informacion S.L.