You're not actually using your ProvidesKeys
in your MultiSelectionModel
. You need to create your MultiSelectionModel
like so:
MultiSelectionModel<T> selectionModel = new MultiSelectionModel<T>(keyProvider);
If you don't supply the MultiSelectionModel
with a ProvidesKey
it will use the actual object as a key.
Make sure you also add the MultiSelectionModel
to the table:
cellTable.setSelectionModel(selectionModel);
The reason selectionModel.clear()
wasn't working was because selectionModel
was not set to the table.