Thursday, July 5, 2012

What should I use instead of Tree.addTreeListener

Hi

I'm learning GWT from the book "Beginning Google Web Toolkit".
It uses a Tree widget and an addTreeListener which is now deprecated.
I cannot work out what I should use instead of addTreeListener.
The section of code where the problem occurs is shown below

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tree categoryTree = new Tree();
categoryTree.addTreeListener(new TreeListener() {                                                                 // This is the line that is deprecated
        public void onTreeItemSelected(TreeItem item) {
                 selectedCategory = ((CategoryTreeItem)item).getCategory();
                 updateTaskList();
       }
       public void onTreeItemStateChanged(TreeItem item) {
      }
});

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Does anyone know what I should use instead of addTreeListener and how this section of code should be?


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/tRm6HZAUm4cJ.
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.

No comments:

Post a Comment