MODEL
- model typepublic class OptionToModelTypeConverter<MODEL> extends Object implements com.vaadin.data.Converter<Option,MODEL>
Option
value into ValueBoundProperty.getType()
.
In case ValueBoundProperty.getType()
is set to Collection
then no conversion is done
and string Option.getValue()
is returned. This is because ValueBoundProperty.getType()
is type of
the field (not type of selected element) and converter for multi-select field is by default
automatically wrapped into MultiItemConverter
- see SelectFieldBinder.createConfiguredConverter(info.magnolia.ui.field.FieldDefinition<PT>, com.vaadin.data.HasValue<?>)
.Constructor and Description |
---|
OptionToModelTypeConverter(FieldDefinition fieldDefinition,
OptionListDefinition optionListDefinition) |
Modifier and Type | Method and Description |
---|---|
com.vaadin.data.Result<MODEL> |
convertToModel(Option option,
com.vaadin.data.ValueContext context) |
Option |
convertToPresentation(MODEL value,
com.vaadin.data.ValueContext context) |
public OptionToModelTypeConverter(FieldDefinition fieldDefinition, OptionListDefinition optionListDefinition)
Copyright © 2020 Magnolia International Ltd.. All rights reserved.