gwtmgwtcelllist

mgwt attach CellSelectedHandler to GroupingCellList inside HeaderList


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?


Solution

  • 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());
            }
        }));