// selection model
final SingleSelectionModel<Record> selectionModel = new SingleSelectionModel<Record>();
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
Record selectedRecord = selectionModel.getSelectedObject();
// do something with the record
}
});
table.setSelectionModel(selectionModel);