Package org.linkki.core.ui.aspects
Class PrimitiveAwareValueAspectDefinition
- java.lang.Object
-
- org.linkki.core.ui.aspects.ValueAspectDefinition
-
- org.linkki.core.ui.aspects.PrimitiveAwareValueAspectDefinition
-
- All Implemented Interfaces:
LinkkiAspectDefinition
public class PrimitiveAwareValueAspectDefinition extends ValueAspectDefinition
ValueAspectDefinitionthat preventsnullfrom being set if the model type is a primitive class.
-
-
Field Summary
-
Fields inherited from class org.linkki.core.ui.aspects.ValueAspectDefinition
MSG_CODE_INVALID_INPUT, NAME
-
Fields inherited from interface org.linkki.core.binding.descriptor.aspect.LinkkiAspectDefinition
DERIVED_BY_LINKKI, VALUE_ASPECT_NAME
-
-
Constructor Summary
Constructors Constructor Description PrimitiveAwareValueAspectDefinition(com.vaadin.flow.data.converter.Converter<?,?> converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.vaadin.flow.data.converter.Converter<?,?>getConverter(Type presentationType, Type modelType)Returns a converter that should be used to convert a value of model type to a value of presentation type.-
Methods inherited from class org.linkki.core.ui.aspects.ValueAspectDefinition
createUiUpdater, getInvalidInputMessage, getValueContext, initModelUpdate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linkki.core.binding.descriptor.aspect.LinkkiAspectDefinition
supports
-
-
-
-
Method Detail
-
getConverter
protected com.vaadin.flow.data.converter.Converter<?,?> getConverter(Type presentationType, Type modelType)
Description copied from class:ValueAspectDefinitionReturns a converter that should be used to convert a value of model type to a value of presentation type. Note that the presentation type should match the value type of the input field.Uses
Converter.identity()by default. Override to add converters.- Overrides:
getConverterin classValueAspectDefinition- Parameters:
presentationType- value type of the input fieldmodelType- the model type- Returns:
- a converter from model type to presentation type
- See Also:
LinkkiConverterRegistry
-
-