GWT cells are not compatible with GWT widgets. This means that you cannot have a GWT widget located inside the cell, and it is still functioning. Cells have an alternative event handling mechanism (see below)
The reason for this is because the cells are closer to stateless rendering. Given a data object, Cell spills out HTML. A single cell will be reused and supplant HTML for the various elements on the page - and will never support links to any of the DOM elements that it creates.
In the above example, you call "someWidget.toString ()". This will only return the HTML representation of your widget, and this is what loses event handling.
Handling Events in Cells
GWT Dev Guide for Custom Cells (more info available)
To handle events in cells, you need to override a separate method called onBrowserEvent . You also need to configure your cell to notify about specific events by calling super('click', 'keydown') in your constructor with a list of events that you are interested in listening to.
Since the cells are stateless renderers, the context of the rendered element that was clicked along with the original data object that was displayed by your cell will be transferred to onBrowserEvent. You can then apply the changes or manipulate the DOM as needed.
Here is an example taken from the dev manual above:
@Override public void onBrowserEvent( Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater) {
source share