I have a celltable with checkbox. I want to combine two clicks; When I select the row, I also change the state of checkbox. I try the following, but it doesn't work:
column.setFieldUpdater(new FieldUpdater<Item, CheckBoxDisablingCell.CheckState>() {
@Override
public void update(int rowIndex, final Item item, final CheckBoxDisablingCell.CheckState state) {
if(!state.isDisabled()) {
item.getFonctions().get(index).setSelected(state.isChecked());
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
selectionModel.clear();
selectionModel.setSelected(gestionHabilitationsItem, true);
cellTableFonctions.setSelectionModel(selectionModel);
leftCellTable.setSelectionModel(selectionModel);
}
});
}
}
});
With this code I have two click: one for select the row and another for change the state of the checkbox. How can I combine it? Appreciate any suggestions.