Rahul, That should be relatively simple to do. Use RPC for your client-server communication. On the server side, query your database for table names and send a List<String> back to the client. Iterate the list, adding each item to the root of the tree and give each a child node with the text of "Loading..." (or something of your choosing). On the expand of the tree nodes, check the text of the first child node. If it is your stub text, make another call to the server for the columns of that table. When that call returns (callback onSuccess), remove the child node and add each item in the list returned. That will give you a dynamically loaded tree with table and column names. If you don't want it done dynamically, you can create a slightly more complex object to pass from the server to client with all of the table and column names and just the entire tree at once.
As far as getting the table and column names, that will be specific to your database product, but it should be supported by all products. The drag and drop stuff isn't very hard either. You may want to use the dnd library from the incubator if you're not comfortable coding it yourself. When doing the drag and drop, you generally have a reference to the object being dragged, which in your case would likely be the TreeItem. Once the drop happens on the target, your TextBox, you just set the text to the value from the TreeItem. I know this is all very generic, but that describes how I'd implement it. Oh, I usually go the dynamic loading route when dealing with trees. HTH, Chad On Jul 9, 9:21 am, Rahul Mukhedkar <[email protected]> wrote: > any suggestions anyone? > > On Jul 7, 1:43 pm, Rahul <[email protected]> wrote: > > > > > Hi, > > I would like to display the tables on my UI in a tree fashion. The > > tables should open to show the columns names. > > Also I would like to have drag and drop of the column name to a blank > > text field. > > > Does anyone has any idea how to implement this ? > > Thanks in advance --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
