简体   繁体   中英

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

Oh yeah ! I found it !

MultiSelectionModel.addSelectionChangeHandler() 

And it works great !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM