I’m using the tree control in GWT. I have a custom widget that I add as a TreeItem:
Tree testTree = new Tree();
testTree.addItem(myWidget);
I would like to retrieve myWidget instance on the node opening event. Is it possible ? Does anybody knows which event should I be using ?
I tried the openHandler<TreeItem> but what I retrieve is the… tree item.
I was looking to far.
To answer my original question:
The event we retrieve in the openHandler has all the info I needed.
Just for info:
Instead of adding a widget (which I didn’t use anywhere else) to my TreeItem I extended TreeItem to create my own Widget. So I simply needed
event.getTarget()to access it.About FastTree:
For what I read people working with GWT usually go straight to using FastTree which, as Jason said, offers more possibilities and better performances.
I had problem running FastTree in my configuration (even with the examples code) and little time to deal with it so that’s why I sticked with the native Tree widget.