Comment RE com.vaadin.data.util.converter.Converter

This is just a comment about something I find confusing in the Converter framework for displaying/presenting data types.

The interface definition is Converter<PRESENTATION, MODEL>

The class is supposed to go from the model type TO the presentation type, i.e. from some class like date TO its String representation.

However, all the methods are named the other way round. So StringToDateConverter is what you use to go from Date TO String in a Table.

This caused me a bunch of problems early on in adjusting to Vaadin 7.0 and doubtless is causing confusion for new adopters.

I’m writing this comment because I just noticed an unused DateToStringConverter class I’d written a while back that I’m deleting.

On a related note, in what situations would the PRESENTATION class not be String?

Well, a Converter is supposed to go both ways, that’s why it has both convertToModel and convertToPresentation methods. The naming that was chosen makes sense from the viewpoint of converting user input to its data model representation, but, as you said, less so from the opposing point of view.