• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help !Java trees populated by a database

 
Sharon Adar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would appreciate if any one can help me locate open source code for a java tree that is generated from a database. This should be a part of servlet and should be coded without using swing preferably.
An example would be great!
Thanks
Sharon
 
sabera khan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sharon,
I have the same problem.Please let me know if you find a solution...would really appreciate it.
thanks
sabera
Originally posted by Sharon:
Hi,
I would appreciate if any one can help me locate open source code for a java tree that is generated from a database. This should be a part of servlet and should be coded without using swing preferably.
An example would be great!
Thanks
Sharon

 
Ashwin Asani
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
For one of our client I had developed a tree structure menu. Only thing it was not colapsable at the folder level.
The idea is to have a database table with the menu_id, menu_name, menu_url, parent_id,menu_type,etc.
have a bean, plsql code run through this table to generate the UI placing the menu_names as the text and creating a hyperlink using the url. For the tree structure the parent_id & the menu_type are useful to place a particular menu within the other. I had given the menu_type as Folder/Document. A folder will have children. So the logic loops again to find the sub-folders or documents.
So I had a JSP, A Bean and my databse table and I could generate a tree structure. This ofcourse was role based, i.e. when the user logs in , the application determines his role and generates the options that he has in the form of a tree.
The code is kind of proprietory, so I will not be able to share the same. But this is essentially the logic that I used.
Hope this helps.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your name "Sharon" does not comply with the JavaRanch naming policy. Please spare a moment and re-register with a name that meets the requirements.
Thanks!

------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic