Package de.xima.fc.gui.common.converter
Class TypePartsConverter
- java.lang.Object
-
- de.xima.fc.gui.common.converter.TypePartsConverter
-
- All Implemented Interfaces:
IComponentValueConverter<Object,Object>
public class TypePartsConverter extends Object implements IComponentValueConverter<Object,Object>
Implementation of aIComponentValueConverter
that provides only a single value, but offers additional methods to convert this value to different types, seeTypePartsConverter.TypeConvertibleMap
.- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TypePartsConverter.TypeConvertibleMap
Implementation ofIConvertibleMap
for theTypePartsConverter
.
-
Field Summary
Fields Modifier and Type Field Description static IComponentValueConverter<?,?>
INSTANCE
The immutable instance of this converter.
-
Constructor Summary
Constructors Constructor Description TypePartsConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
componentToExternalValue(IConvertibleMap<Object> componentValues)
IConvertibleMap<Object>
externalToComponentValue(Object value)
IConvertibleMap<Object>
newConvertibleMap()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.gui.component.convertible.IComponentValueConverter
createOptions
-
-
-
-
Field Detail
-
INSTANCE
public static final IComponentValueConverter<?,?> INSTANCE
The immutable instance of this converter. Can be used in XHTML pages via<p:importConstants/>
.
-
-
Method Detail
-
componentToExternalValue
public Object componentToExternalValue(IConvertibleMap<Object> componentValues)
- Specified by:
componentToExternalValue
in interfaceIComponentValueConverter<Object,Object>
- Parameters:
componentValues
- The value on the component.- Returns:
- The value to be set on the backing bean or model.
-
externalToComponentValue
public IConvertibleMap<Object> externalToComponentValue(Object value)
- Specified by:
externalToComponentValue
in interfaceIComponentValueConverter<Object,Object>
- Parameters:
value
- The value on the backing bean or the model.- Returns:
- A map of values to be used on the component. In your xhtml, you can use the key you assign here to access the value.
-
newConvertibleMap
public IConvertibleMap<Object> newConvertibleMap()
- Specified by:
newConvertibleMap
in interfaceIComponentValueConverter<Object,Object>
- Returns:
- A new, empty convertible map. Used as the default when none is avaiable yet.
-
-