PDA

View Full Version : "paging" within tree nodes of large tree



Carina
17 Jan 2007, 6:24 AM
hi,

I have a question concerning the new TreePanel. I want to build a really large tree (>1000 child nodes for one node, overall maybe 100k nodes). Based on the two-tree.js example, I've tested a tree with 1000 nodes in the root of the tree and (of course) it takes some time to load the tree (>10 seconds).

That's why I'm wondering if I could implement some form of "paging" within the nodes. What I mean is: the tree has only a certain height anyway, e.g. 500px which gives me enough space to see e.g. 50 nodes at once. So maybe I could load only the first 100 nodes on startup and when I scroll down, load the missing nodes dynamically, depending on how far I've scrolled down.

--> Would it be very hard to implement something like that? Could you maybe give me some hints where/how this could be accomplished and which existing components might be useful?

thx a lot!




P.S.: yui-ext is just so damn cool. I love the way it's organized and all the little "things that would be nice to have" and that are really there. As soon as I use it in a real project, I will be donating for sure. Jack, you're really doing a great job (that will hopefully save me a lot of time & troubles ;-) ).

deb
30 Jul 2007, 10:49 AM
Well i am also looking forward to do the same thing with ext, did you have any luck

thanks

Carina
30 Jul 2007, 10:13 PM
No sorry, I didn't try anything yet... too many other things to do (that are already supported by Ext ;) )

deb
1 Aug 2007, 3:49 AM
Oh ok, wish i get someone here who did this before i start, could not start this yet, but i got to do this down the line...lets see how it goes, thanks anyway :)

Carina
1 Aug 2007, 3:55 AM
If you come up with something, it would be great if you could share some of your experience ;-)

At the moment I have too many other things to take care of, that's why I couldn't start this yet. Plus: I'm also not sure if it will be possible to load so many DOM elements at once (because after some time & scrolling, there still will be a lot of nodes).

That's why I was thinking about splitting the tree alphabetically (e.g. using a tab for all tree nodes that start with "A", one for all tree nodes that start with "B" and so on). But of course I would prefer scroll paging if it was possible (splitting the nodes alphabetically might soon be pretty annoying).

Footeuz
9 Aug 2007, 6:20 AM
I have exactly the same question !!!!!!!!

With 5000 elements it's still ok(very long but it works)
But we tested with 8000 elements and it crash the browser.

we thought also to a scroll paging.
But i have no idea how to do it.....

aslam128
4 Sep 2008, 3:21 PM
check out this thread http://extjs.com/forum/showthread.php?p=213913
I have not tried it yet though. will post comments once i try it out.