• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying a tree?

 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am tasked with building an application using struts where the end user would input data and as that data is being inputted, a tree structure would be built and displayed on the data entry page. I have thought about scrubbing the entire struts part and doing a swing application but I am not sure if this would be permissible. Has anyone who would like to share your experiences done this before?
I was thinking generally along these lines; the data entered could be sent back on submit to the database. Perhaps in the database, along with storing the information, I could somehow store the structure of the tree and return it to be displayed? Any thoughts?

Thanks
 
Pat Peg
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I realized I needed to refine things a bit. The data would actually be displayed more like a file system (yes, I know this is a tree as well). Didn't know if that added to the problem or not.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've used trees extensively in my applications. What I have done is download one of the open source (or nearly open source) javascript tree controls. The two I have experience with are xTree by WebFX (http://webfx.eae.net/dhtml/xtree/implementation.html) and treeView (http://www.treeview.net/). These tree controls allow the user to expand and contract nodes just as they would on Windows Explorer.

I have then written code that will generate the appropriate javaScript statements that will produce the tree that I want displayed.

There are also tree controls in other frameworks such as JSF and struts-menu.
 
reply
    Bookmark Topic Watch Topic
  • New Topic