Hi all,

I added a SelectionHandler to my tree. If a leaf if selected, an other
Event should be fired. If the users selects an node with childs, the
branch should be opend (if it's state is false) or (closed if state is
true). Selecting a leaf works fine. Opening an branch works fine too.
If a branch is opend, the event is fired twice, and the branch is
closed and opened immediately.
Is it a bug? In GWT Version 1.1.0 was a bug fixed concerning Events on
Trees (I'm using GWT 1.6.4). Or have I an error in reasoning?
My code looks like this:

        public void onSelection(SelectionEvent<TreeItem> event) {
                TreeItem item = event.getSelectedItem();
                if(item.getChildCount() == 0) {
                        controller.navigationChanged(item);
                }
                else {
                        item.setState(!item.getState());
                }
        }

Thanks for responses
meandi
--~--~---------~--~----~------------~-------~--~----~
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