I've a table which uses a checkbox column for selection. On Chrome browser my checkColumn.setFieldUpdater method is correctly invoked BUT on IExplorer and Firefox
it is only invoked when the checkbox is deselected NEVER on selection. Does anyone know how I could solve this problem?private void addCheckboxColumn(final SelectionModel<TableRow> selectionModel) {
// Checkbox column. This table will uses a checkbox column for
// selection.
Column<TableRow, Boolean开发者_Python百科> checkColumn = new Column<TableRow, Boolean>(
new CheckboxCell(true, false)) {
@Override
public Boolean getValue(TableRow object) {
// Get the value from the selection model.
return selectionModel.isSelected(object);
}
};
checkColumn.setFieldUpdater(new FieldUpdater<TableRow, Boolean>() {
public void update(int index, TableRow object, Boolean value) {
// Called when the user clicks on a checkbox.
selectionModel.setSelected(object, value);
((CheckItemPresenter) presenter).doCheckedItem(
currentSelectIdStrategy.getId(object), value);
}
});
cellTable.addColumn(checkColumn, HTML_BR);
}
You're running into issue 5256. Fortunately there's an easy workaround (see comments on the issue, just place the fixed file in your project/classpath and it should work)
精彩评论