I guess this is a wrong approach to do this job. So I have 2
questions .
1. If I use java directly generate the html as Jstree data source ,
does this theoretically 2 times faster than json , because it doesn't
need to parse jason to html ?
2. Does Jstree has a build in support for lazy loading ? that's to
say , when I click the "+" to expand the children nodes , jstree will
load next level data . well this event is easy to capture , but how
can I pass the next level data to it's parent node without the whole
tree be refreshed ?
--
You received this message because you are subscribed to the Google Groups "jsTree" group.
To post to this group, send email to jst...@googlegroups.com.
To unsubscribe from this group, send email to jstree+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jstree?hl=en.
I know Jstree has the ability to lazily load data when expand the
node. But I could only set the data store once when the tree is setup.
How can I pass the lazily loaded html to the current expanded node as
it's children ? Fetching the data is no problem. I don't know how to
set the children nodes to it's parent. I guess it isn't done with
jquery's api by injecting children html to parent <li> tag.
> > jstree+un...@googlegroups.com<jstree%2Bunsu...@googlegroups.com>
To unsubscribe from this group, send email to jstree+un...@googlegroups.com.
I used this approach before generating the html "ul li" and adding the
jstree on top of that to make it a treeview. What happened is that the
list of uls li first displayed on the page without being parsed by
jstree because jstree was too slow parsing it. in the case of 2000++
nodes, i would guess that you would see that ul li list for about 20
seconds before it becomes a treeview. I used asynchronous load and it
went much faster in my case.
When applying jstree to an existing html, jstree needs to select every
html node and add classes to it. Correct me if I'm wrong, but I doubt
this is faster than generating the html from a json object.
Vakata could probably answer this better :).
Please tell us how it goes Evloye Wang. Interesting to know how you
solve your problem.
Also the version 1.0 is announced to be *much* faster, so that might
solve some of your problem too.
Stéphane
> > jstree+un...@googlegroups.com<jstree%2Bunsu...@googlegroups.com>
@John Arrowwood
I used this approach before generating the html "ul li" and adding the
jstree on top of that to make it a treeview. What happened is that the
list of uls li first displayed on the page without being parsed by
jstree because jstree was too slow parsing it. in the case of 2000++
nodes, i would guess that you would see that ul li list for about 20
seconds before it becomes a treeview.
I used asynchronous load and it
went much faster in my case.
When applying jstree to an existing html, jstree needs to select every
html node and add classes to it. Correct me if I'm wrong, but I doubt
this is faster than generating the html from a json object.
To unsubscribe from this group, send email to jstree+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jstree?hl=en.
html >> render >> jquery select >> change classes >> render again //
so I guess if you hide it first, it's faster, since you skip the first
rendering :)
json >> generate html >> inject >> render
I didnt try just to hide it first, I went for the json solution, and
it was just perfect...
On my developer machine, html solution was fine and fast, but I saw it
rendering very slow on a slower machine.
Anyway, we're going to upgrade it to 1.0 using jquery 1.4 anytime soon
I am guessing, so i can test that then :)'
Thanks for your input
On Jan 26, 4:44 pm, John Arrowwood <jarro...@gmail.com> wrote:
> > <jstree%2Bunsu...@googlegroups.com<jstree%252Buns...@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/jstree?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "jsTree" group.
> > To post to this group, send email to jst...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > jstree+un...@googlegroups.com<jstree%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/jstree?hl=en.
>
> --
Cheers,
Ivan
one of our clients has a node structure with 11,000 (yes eleven
thousand) nodes.. im spitting out html straight to the client through
a recursive loop (its a nested set structure) .. data is processed
and displayed on the clients machine in 5 seconds flat.
J
Kindest regards,
Ivan