Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Tree in JSF.  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!