ExternalValue
- Type of the external value, usually the value used by the backing bean.ComponentValue
- Type of the value required by the JSF or PF component.public interface IComponentValueConverter<ExternalValue,ComponentValue>
convertible
. Lets you convert between a bean value and the value that is
used for the component or components. For example, you could have a bean property date
, of type Date
.
If you want to have three different input fields, one for the year, one for the month, and one for the day, you can
use the convertible composite component. This way you do not have to add new bean properties for the year, month, and
date, which would require you to keep them in sync with the original date object. See ConvertibleComponent
for an example.Modifier and Type | Method and Description |
---|---|
ExternalValue |
componentToExternalValue(IConvertibleMap<ComponentValue> componentValues) |
default IConvertibleMap<ComponentValue> |
createOptions(IConvertibleMap<ComponentValue> componentValues) |
IConvertibleMap<ComponentValue> |
externalToComponentValue(ExternalValue value) |
default IConvertibleMap<ComponentValue> |
newConvertibleMap() |
IConvertibleMap<ComponentValue> externalToComponentValue(ExternalValue value)
value
- The value on the backing bean or the model.ExternalValue componentToExternalValue(IConvertibleMap<ComponentValue> componentValues)
componentValues
- The value on the component.default IConvertibleMap<ComponentValue> createOptions(IConvertibleMap<ComponentValue> componentValues)
componentValues
- The values as used for the component.default IConvertibleMap<ComponentValue> newConvertibleMap()
Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.