• 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

Tree in JSF.

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can anyone tell me how to create a tree in JSF.
My other option is to create the same using Myfaces Trnindad.

But i could not find a working example for the same .

Also, my problem is that the tree is getting refreshed for every submit of the form(which is the need), however, i need to bring the tree in the same state as it was before submit. That is, for example, if the user has selected a tree node which is a child of many other tree nodes, then after submit , i need the same tree node to be selected and teh tree should be in the same expanded state as it was before submit.

Thankx in Advance.
 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried using richfaces.

Here is the demo
http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf

Here is the example code to keep the tree state across the request.
http://jboss.com/index.html?module=bb&op=viewtopic&t=126153
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can create the tree using apache myfaces tomahawk library. It is very simple.
You can see the sample tree at http://www.irian.at/myfacesexamples/home.jsf
You can get the code sample at i.e MyFaces Tomahawk 1.1.6 Examples(tar.gz)
from http://myfaces.apache.org/download.html.

I hope this helps
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, about the refreshing problem.. There is a setting.

In tomahawk tree2 component the setting is called "preserveToggle" that you can set to true or false.
reply
    Bookmark Topic Watch Topic
  • New Topic