For the record, there is a workaround, using low-level Dom events:
It is not perfect as we get a Context, ie. only a string id, not the data associated to a node, but that's better than nothing and it allows to change the context menu state (disable, hide items) before displaying it.
private class NodeCell extends SimpleSafeHtmlCell<String>
private static final String NODE_EVENT_CLICK = "click";
private static final String NODE_EVENT_CONTEXTMENU = "contextmenu";
* Constructor, using a default renderer and defining the events we are interested in.
super(SimpleSafeHtmlRenderer.getInstance(), NODE_EVENT_CLICK, NODE_EVENT_CONTEXTMENU);
public void onBrowserEvent(
Context context, Element parent, String value, NativeEvent event,
super.onBrowserEvent(context, parent, value, event, valueUpdater);
else if (event.getType().equals(NODE_EVENT_CONTEXTMENU))
Note also the management of click on a node, as the select event is fired even if we just open a parent node: if we associate a complex display to such parent, we don't necessarily want to display it on each step of navigating the tree.
Think "file explorer" where you might want to go down a hierarchy without displaying the list of files of each level, for example.
If GXT 3 could distinguish the two events (click to fold / unfold a node, click on the node itself) at a higher level, it would be nice.