mgwt attach CellSelectedHandler to GroupingCellList inside HeaderList

194 Views Asked by At

I'm having trouble attaching an SelectionHandler to the contents of the mgwt HeaderList. How can I attach a CellSelectedHandler to a HeaderList just like in the Showcase? http://mobilegwt.appspot.com/showcase/#GroupedCellListPlace:

I already tryed to attach the Handler to the GrouingCellList with wich the HeaderList is built, but this Handler is never fired.

Anyone done this already?

1

There are 1 best solutions below

0
Georg On BEST ANSWER

I managed to get the SelectEvents using the SelectionHandler instead of the CellSelectedHandler on the GroupingCellList

        addHandlerRegistration(view.getList().addSelectionHandler(new SelectionHandler<Content>(){
        @Override
         public void onSelection(SelectionEvent<Content> event) {
                Window.alert("event"+event.getSelectedItem().getName());
        }
    }));