Reputation: 4588
There is a similar question to this for ExtJS but not for GXT.
I wish to simply add an onclick handler to a TreePanel in GXT. That is, I wish to perform an operation when a user clicks on a node in the tree. The showcase does not seem to cover this most basic usecase.
Thanks,
Upvotes: 0
Views: 3034
Reputation: 4588
Premature cry for help it seems.
This seems to do the trick:
treePanel.addListener(Events.OnClick, new Listener<TreePanelEvent<ModelData>>() {
public void handleEvent(TreePanelEvent<ModelData> be) {
// do something here
};
});
Upvotes: 1