Hi, all.
I've encountered some odd behavior when using a SingleSelectionModel
with a CellTable: when the user clicks a cell in the table, my
onSelectionChange callback reports the correct selected object, but
the CellTable widget appears to have all rows selected, as opposed to
just the row corresponding to the selected object. I initialize the
table as follows:
...
// set the data provider
dataProvider.addDataDisplay(table);
// add a selection model
final SingleSelectionModel<Sample> selectionModel = new
SingleSelectionModel<Sample>();
selectionModel.addSelectionChangeHandler(new
SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
Sample selected = (Sample) selectionModel.getSelectedObject();
if(selected != null) {
GWT.log("You have selected: " +
selected.getExperimentId() + " " +
selected.getSampleId());
}
}
});
table.setSelectionModel(selectionModel);
...
Any ideas as to what might be wrong?
Thanks in advance for your help!
-John Bates
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.