This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Dynamic, server-side construction of the tree, reading from a database

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have to represent the data in a tree structure format in my jsp page. The datas are stored in the database in tree structure way. i just need to write a java class which can help me to display those data in tree strutcure way.

Could some one tell me how to do that or provide me some good link on this.

thanks in advance
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess I'd start with figuring out how the tree will be represented in HTML and start from there.
 
R .sourav nayak
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
thanks for the immediate response. I have already created the tree structure in my html by puting the hardcoded datas and the structure looks like following :

but now i wanted to get those datas in tree structure way from the database
since my application is struts based, in my action class ,i am able to iterate though the nodes and leaf nodes. But the problem i am having is - in my action class i am not able to keep that temporarly in a tree structure way as i go through each iterator. so its being problem for me to display that on jsp page.

Could you provide me some hint

thanks in advance

[BPSouther: Added code tags]
[ November 08, 2007: Message edited by: Ben Souther ]
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic