Create Multiple Nodes At Once

498 views
Skip to first unread message

Byron Cobb

unread,
Aug 19, 2010, 11:23:25 AM8/19/10
to jsTree
Hi there!

I've got a tree which I wish to populate with multiple nodes at once
using .create or some variation.
I can build up a json string to insert into the tree, but I have to do
it client side and not post from a server.

Right now i'm iterating through a number of options and calling
the .create method for each which, as i'm sure you can imagine, is
really really slow.

Regards,
Byron Cobb.

Byron Cobb

unread,
Aug 23, 2010, 5:50:14 AM8/23/10
to jsTree
I've got this sorted...

Koos

unread,
Sep 30, 2010, 3:49:29 AM9/30/10
to jsTree
How?

vakata

unread,
Sep 30, 2010, 4:34:32 AM9/30/10
to jsTree
Make sure you really need to programatically create a bunch of new
nodes - are you sure you are not simply recreating the features of the
JSON_DATA plugin for example (which can parse through arrays, AJAX,
etc).

If you are really sure that you need to do that - well, you can call
the parse_json function, append the result where you need it and call
clean_node on the common parent.

That is about it.

Kindest regards,
Ivan

On 30 Септ, 10:49, Koos <koosvdk...@gmail.com> wrote:
> How?
Reply all
Reply to author
Forward
0 new messages