This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes GWT and the fly likes Dynamic Tree using GWT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Dynamic Tree using GWT" Watch "Dynamic Tree using GWT" New topic
Author

Dynamic Tree using GWT

karthik shivkumar
Greenhorn

Joined: Oct 02, 2006
Posts: 6
Hi,

I am trying to build a dynamic tree using GWT. Any code examples, that you refer would be much appreciated.

E.g. of what I am trying to build

Root
|
Level 1
|
Level 1.1
|
Level 2
|
Level 2.1
Level 2.2

and so on..


Skay
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

Check out http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java?r=2610


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
karthik shivkumar
Greenhorn

Joined: Oct 02, 2006
Posts: 6
Thanks Maneesh.. But, I wasn't able to use the addTreeListener method.. Since it says the method is deprecated..
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

From the API docs

Deprecated.
Use addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler),
addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler),
and addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler) instead
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamic Tree using GWT
 
Similar Threads
JSF Vs. ASP.NET
Context Menu on Tree in GWT 2.0.3
Need help understanding Dojo Struts2 ajax tree generation
How to create Editable Tree structure with database data
creating netui:tree from XML