Hi,
I’m going to use ConverterFactory within vaadin 8 as described here:
https://vaadin.com/wiki/-/wiki/Main/Changing+the+default+converters+for+an+application
(thre goal is to set grid display format for java.util.Date in whole application)
But class DefaultConverterFactory is depricated.
Vaadin 8 has another formating concept?
Vaadin 8 uses DateRenderer in Grid. But, unfortunately, this only print Date.toString() in default locale.
In near future, they said, there will be LocalDateRenderer…
actGrid.addColumn(m -> m.getActivity().getStartDate(), new DateRenderer())
Otherwise you can use a custom formatter, this way:
DateTimeConverter dtConv = new DateTimeConverter(); // your com.vaadin.data.Converter
...
actGrid.addColumn(m -> dtConv.convertToPresentation(m.getActivity().getStartDate(),
new ValueContext(locale)));
Thanks, I will try…
Deprecating DefaultConverterFactory without replacement was one of massive let-downs of Vaadin 8. Now there is no way to get rid of commas in numbers littered everywhere in UI