Tree and OpenHandler, opened item always nulll
Hi everyone,
I try to add an OpenHandler on a tree to lazilly load the tree
structure. But when I try to retrieve the node with
OpenEvent.getTarget().getUserObject() I always get a null reference.
I don't understand why the userObject is null.. Please help me.
...
private final Tree hierarchy = new Tree();
public void onModuleLoad() {
hierarchy.addOpenHandler(new OpenHandler<TreeItem>() {
@Override
public void onOpen(final OpenEvent<TreeItem> event) {
TreeItem item = event.getTarget();
Object userObject = item.getUserObject();
// userObject is null !!
}
...
}
}
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home