Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tree structrue with dynamically loaded data

 
Janina Rebhan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I need a tree structure that can render dynamically loaded data.

I tried richfaces' rich:tree and had a look at tomahawk's and tree2. I know that these two trees can dynamically display the nodes so that only the expanded nodes are send to the client. But after all the data needs to be loaded on the server at the beginning.
But what I need is that on expand of a node I can load the expanded data that needs to be displayed on the server at that time and not from the beginning.

The data I need to load needs too much time to be loaded by the server from the beginning. So I want it to be loaded when it needs to be displayed.

I got it working with rich:tree but it had side effects and didn't work as I needed it to ... The problem was that I don't know how I can get the information which node was expanded. I used [a4j:support event="onmousedown"] with a param to get this information but I think this had side effects too.

So, I hope you can help me with this one. I tried to get it to work for 3 days now

If anything is unclear just ask (I know that I explained it quite complicated ;) )

Greetz, Janina
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check whether the below link can help you.

http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf
 
Janina Rebhan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
Thanks for your answer but as i wrote before i tried rich:tree and it doesn't give me what i need. I need to load the data when it is requested. With rich:tree I have to load the data with the first rendering so that richfaces can then display only the data needed.
I know that there is adviseNodeOpened and changeExpandListener but both don't give you the information which node was clicked so i won't know which data to load.
Greetz, Janina
 
Darryl Nortje
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Janina,

Keep an eye on this one. Your answer might pop up there sometime today...

cheers
Darryl
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic