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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to