To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
How can I provide the equivalent functionality to a custom comparator to a Grid to use when sorting by a particular column?
For example, I've got a grid column that contains (HTML) strings generated from an underlying bean, and I'd like to sort by something other than basic alphebetical order. What's the best way to go about doing this?
In Vaadin 7 I was using a custom ItemSorter on the underlying container, but this doesn't seem to be supported anymore.
I'd thought of wrapping the strings in some custom object with an implementation of Comparable, but then I wouldn't be able to use HtmlRenderer (unless I'm missing something?)