Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Associating a DataTable for a node of a rich tree

 
zul' Zorander
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to associate a datatable for some nodes of a rich tree(not all the nodes). I tried enclosing a data table within rich:tree which obviously associated datatable for each node. I tried to associate a datatable within rich:treeNode and i no datatable is associated with the node. Can any one explain the reason behind this...........

Thanks
Zeddicus
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17995
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, the RichFaces tree is fairly limited in what types of elements can be made children of its nodes, though it isn't explicitly stated. I had major grief, in fact, just trying to get the node text to wrap and not slop outside of the display area.

Effectively, the RichFaces tree children have to be "outputText" types of items, not complex sub-controls.
 
zul' Zorander
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Tim
Actually my requirement is that some of the nodes of a tree has around 300 children which are leaf so I thought of putting all of them in a table under the parent node instead of displaying 300 nodes. So when creating a tree i can check for nodes which have more than 100 nodes and add all the children into an arraylist (which is a attribute of node type) and upon clicking the node i am displaying a table with all the elements of arrayList so user can choose elements from them. I am implemented this approach but I am not sure whether it delivers good performance......What do you think of this approach???

Thanks
Zeddicus
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17995
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't even bother. I have a 3-level tree that I tried to convert to a menu scheme. Every time the page refreshed, over 3MB of data came stampeding down the pipe, and even on a LAN, that was too big a hit.

You'd be better off tying a separate table display pane to the tree.
 
zul' Zorander
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Tim I could not understand your answer completely (I am very new to RichFaces). I have many different ideas but dont know their performance. How can we find how much data is sent/recieved on each request. Since in my tree problem I am only using ajax requests doesn't it take lot less data to display table???
I also could not understand the meaning of "tying a separate table display pane to the tree". Is it attaching a table with each node of the tree? Because if I tried enclosing a dataTable within the richtree tags which produced a datatable for every node(obviously!) or associating a table on the click of node or selection of node??

Thanks
Zeddicus
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic