public class XWorkBasicConverter extends DefaultTypeConverter
XWork will automatically handle the most common type conversion for you. This includes support for converting to and from Strings for each of the following:
Note that with arrays the type conversion will defer to the type of the array elements and try to convert each item individually. As with any other type conversion, if the conversion can't be performed the standard type conversion error reporting is used to indicate a problem occurred while processing the type conversion.
MILLISECOND_FORMATNO_CONVERSION_POSSIBLE, TYPE_CONVERTER_CONTEXT_KEY| Constructor and Description |
|---|
XWorkBasicConverter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
convertValue(Map<String,Object> context,
Object o,
Member member,
String propertyName,
Object value,
Class toType)
Converts the given value to a given type.
|
void |
setContainer(Container container) |
bigDecValue, bigIntValue, booleanValue, convertValue, convertValue, doubleValue, enumValue, getLocale, getTypeConverter, longValue, stringValue, stringValuepublic void setContainer(Container container)
setContainer in class DefaultTypeConverterpublic Object convertValue(Map<String,Object> context, Object o, Member member, String propertyName, Object value, Class toType)
TypeConverterconvertValue in interface TypeConverterconvertValue in class DefaultTypeConvertercontext - context under which the conversion is being doneo - target object in which the property is being setmember - member (Constructor, Method or Field) being setpropertyName - property name being setvalue - value to be convertedtoType - type to which value is convertedCopyright © 2000–2023 Apache Software Foundation. All rights reserved.