Hi Alejandro
This component is a real time saver.
Thank you for contributing!
I am having a small visual issue with the form.
My entity contains a property of type Date.
To be able to present it properly I’ve added a property of type LocalDate.
For this type, I can use the LocalDateRenderer.
I assume, the idea is to use LocalDate in favor of Date?
However for the form, I supplied a Converter of type Converter<String, LocalDate> to be able to display the date in a user friendly format.
The problem is, that this converter never gets called.
A Map of Converters is contained in CrudFormConfiguration, but I don’t see these converters being read.
My converter looks like this:
crud.getCrudFormFactory().setConverter("dayLoc", new Converter<String, LocalDate>() {
@Override
public Result<LocalDate> convertToModel(String value, ValueContext context) {
return Result.ok(MyUtil.parse2LocDate(value));
}
@Override
public String convertToPresentation(LocalDate value, ValueContext context) {
return MyUtil.dayformat().format(value);
}
});
I am using Vaadin 14.0.12 and crudui 4.1.0.
Are you able to help out?