Maxime ARNSTAMM
Maxime ARNSTAMM

Reputation: 5314

GWT CheckBoxCell : how to add a change handler?

I am using the code from http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable to insert a checkbox column in a celltable.

I would like to render a button (outside the table) only if some lines are selected, but i don't see how i can add the eventHandler.

I tried to use a field updater, but it doesn't work :

FieldUpdater<Bean, Boolean> checkFU = new FieldUpdater<Bean, Boolean>() {
    @Override
    public void update(int index, Bean object, Boolean value) {
        addSelectionButton.setVisible(!selectionModel.getSelectedSet().isEmpty());
    }
};

Any idea or documentation ?

Thanks

Upvotes: 0

Views: 1579

Answers (1)

Maxime ARNSTAMM
Maxime ARNSTAMM

Reputation: 5314

Oh yeah ! I found it !

MultiSelectionModel.addSelectionChangeHandler() 

And it works great !

Upvotes: 1

Related Questions