}
}
private void addDeleteColumn() {
if (allowDelete) { // only attach delete column of the user is allowed to delete
final Column<Dto, Boolean> delCol = new Column<Dto, Boolean>(new CheckboxCell()) {
@Override
public Boolean getValue(Dto object) {
return false;
}
};
delCol.setFieldUpdater(new FieldUpdater<Dto, Boolean>() {
@Override
public void update(int index, Dto object, Boolean value) {
// mark this item for later deletion
object.set("deleteFlag", value);
}
});
// TODO how can we observe checkbox state changes?
final Header<Boolean> h = new Header<Boolean>(new CheckboxCell()) {
@Override
public Boolean getValue() {
return false;
}
};