Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Treeview in JSP

 
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys

There is something i am thinking about working on and i would like to get your take on it. I have been out of the javaspace for about 6 months so your opinions would be appreciated.

I want to make a jsp that has a treeview, i want the treeview to mimic the nodes i have in an XML file. I am assuming the only way to get a treeview is to use Javascript which i do not like using. Would i have to build an xml reader, parse the xml then build the tree onload of the page? Is there a better way, or newer technology i am unaware of?

Thanks

GB
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you are in the JSP forum, which means that hopefully you understand that JSP is a server-side technology, while JavaScript is a client-side technology. Ergo, do you want your "treeview" to change once rendered on a user's browser? If you do, then you will need a client-side technology like JavaScript. You could "refresh" your "treeview" by making further HTTP requests from your server, on which some JSP file would have the job of rendering the tree. So, each time the user clicks a "+" to expand a node, it sends some more info to the server and your JSP file renders it all over again from scratch.

Oh, if you just want it rendered once and that's it, JSP is good. After that there's the issue of browser XML plugins, etc. (Yucky!) So, what exactly would you want this "treeview" of yours to do?
 
Greg Belyea
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well to be honest i was hoping you were gonna bust out some knowledge of Java Server Faces, a static tree structure would not be of much use, it needs to be dynamic, there will be category nodes, and under the category will be link nodes which will take you off to different URL's. The end result will be done with Portals and Portlets. i was just looking for creative opinions/suggestions....

GB
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the JSF side of the house, have a look at Oracle's ADF faces at http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/imageIndex.html. This is an early acces release of pre-built components. A tree component is present. Also, check out the Ourfaces JSF component project at https://ourfaces.dev.java.net/ (also http://www.ourfaces.net:8080/ourfaces/)
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"GaryG",

Glad that you're here with us on the good ol' JavaRanch and I reckon that you'll find this a helpful and useful site, but we do got us a few rules that y'all got to play by. One of these is that proper ID is required before you can belly on up to the bar. Please take a gander at the JavaRanch Naming Policy and adjust your display name to match it.

The particulars is that your display name must be a first and a last name separated by a space character, and must not be obviously pulling our legs!

Thank ya kindly!
bear
Forum Bartender
 
reply
    Bookmark Topic Watch Topic
  • New Topic