GWT CellTable selection and one click on CheckBoxCell

I have a CellTable that works with SingleSelectionModel to make a separate selection and display some information in the details pane. In addition, I have a CheckBoxCell column in this CellTable that works with another MultipleSelectionModel to perform a bulk delete operation.

When I try to click on a flag in the CheckBoxCell column, GWT selects the row, and after the second click on the flag, it changes the flag. Therefore, we must make two clicks, but I need to do this (change the state of the checkbox) with one click.

I tried to fix this differently:

  • Change dependOnSelection and handles Select options in CheckboxCell
  • Change SelectionEventManager to CellTable (DefaultSelectionEventManager.createCheckboxManager (), DefaultSelectionEventManager.createCustomManager)

But that will not work.

I found similar problems on the Internet, but they all work with the same MultipleSelectionModel. This is not the same as what I want, because there is a detailed panel (so that I can only make one choice).

Can someone help me figure out how to solve it?

UPD: I just uninstalled SingleSelectionModel and redesigned the interface to work with MultipleSelectionModel. This is gwt-hell ..

+5
source share
1 answer

: MultiSelectionModel CellTable, , ( dependsOnSelection handlesSelection true), master-detail, CellPreviewEvent.Handler ( DefaultSelectionEventManager#createCustomManager) RowStyles getRowElement + addStyleName/removeStyleName (RowStyles, CellTable , getRowElement ).

+3

All Articles