This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSF and the fly likes Struggling with RichFaces tree and Ajax. I don't want to load whole tree only the necessary children Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Struggling with RichFaces tree and Ajax. I don Watch "Struggling with RichFaces tree and Ajax. I don New topic
Author

Struggling with RichFaces tree and Ajax. I don't want to load whole tree only the necessary children

Dale Prather
Greenhorn

Joined: Oct 25, 2011
Posts: 2
I'm trying to build a heirarchical tree using RichFaces 3.3.3. The data that the tree will be built from varies greatly. It could be a large tree or it could be small; therefore, I want to go fetch the children when a node is expanded using ajax. I do not want to have to load all of the data when building the tree for the first time. When the user expands a node, I want to hit the database and bring back it's children at runtime



I have looked on the richfaces site, and have found nothing similar to what I'm trying to accompish. The examples I found are loading the entire tree up front.



Can anyone point me in the right direction? Sample code would be great. Thanks in advance.



Dale
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15665
    
  15

Look again. Specifically, look at the actual RichFaces manual. Admittedly it can be confusing, but it's there. Fortunately. I had a system that would have otherwise downloaded over 3MB worth of menus every time the page was refreshed.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
jQuery in Action, 2nd edition
 
subject: Struggling with RichFaces tree and Ajax. I don't want to load whole tree only the necessary children
 
Similar Threads
Associating a DataTable for a node of a rich tree
Problem getting richfaces tree to display
Folder icon display at richfaces tree node
parse large xmlfile and display using swing
I could not expand myfaces tree