com.vaadin.ui.declarative.converters.
Class DesignLocalDateTimeConverter
- java.lang.Object
-
- com.vaadin.ui.declarative.converters.DesignLocalDateTimeConverter
-
All Implemented Interfaces:
public class DesignLocalDateTimeConverter extends Object implements Converter<String,LocalDateTime>
A
LocalDate
converter to be used byDesignAttributeHandler
. Provides ISO-compliant way of storing date and time.Since:
8.0
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Constructor Description DesignLocalDateTimeConverter()
-
Method Summary
All Methods Modifier and Type Method Description Result<LocalDateTime>
convertToModel(String value, ValueContext context)
Converts the given value from model type to presentation type.
String
convertToPresentation(LocalDateTime value, ValueContext context)
Converts the given value from presentation type to model type.
-
-
-
Method Detail
-
convertToModel
public Result<LocalDateTime> convertToModel(String value, ValueContext context)
Description copied from interface:
Converter
Converts the given value from model type to presentation type.
A converter can optionally use locale to do the conversion.
Specified by:
convertToModel
in interfaceConverter<String,LocalDateTime>
Parameters:
value
- The value to convert. Can be nullcontext
- The value context for the conversion.Returns:
The converted value compatible with the source type
-
convertToPresentation
public String convertToPresentation(LocalDateTime value, ValueContext context)
Description copied from interface:
Converter
Converts the given value from presentation type to model type.
A converter can optionally use locale to do the conversion.
Specified by:
convertToPresentation
in interfaceConverter<String,LocalDateTime>
Parameters:
value
- The value to convert. Can be nullcontext
- The value context for the conversion.Returns:
The converted value compatible with the source type
-
-