I have a CellTree which utilizes a MultiSelectionModel with CheckboxCells as part of a composite cell. That all seems to be working.
What I'm actually trying to do is to generate tabs in my interface for each item that can be selected in the tree. Sounds trivial, but I'm stumped as to how to get the MyData on a selectionChange. The items need to remain selected so that if I unselect them later, the tabs are then removed again.
I need to be get the MyData for the just selected item in order to know what the contents of the tab should be.
final MultiSelectionModel<TableLight> selectionModel = new MultiSelectionModel<TableLight>();
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
}
});
I feel like I'm totally missing the obvious. All I can do in the selectionChange event is to interrogate my selection handler to see what the selected set is. Is there a way I can attach a listener to a specific tree selection instead of a global, "something has changed" listener.
Any hints would be much appreciated.