I have trees working with json readers just fine, however instead of having five separate connections to the server for five trees, i want to use one connection and then have the data for all five trees returned.
That is instead of returning this times five: Class: AJAX Treeview (ajax, json, treeview, tree view) - PHP Classes:: This package can be used to generate and update an hierarchical tree of elements from MySQL database content. A HTML page with some Javascript performs an http://www.phpclasses.org/browse/package/4242.htmlHOME |
[tree data here]
I want to return this: Particletree » Preloading Data with Ajax and JSON:: Jan 24, 2006 Now, if you’re not comfortable using JSON, you can always use XML instead Grab the next page of data and store it as JSON on the client. http://particletree.com/features/preloading-data-with-ajax-and-json/HOME | [Dojo-interest] initialize tree from json:: Jul 21, 2006 I would like to use bind to > read a json file that defines my complete tree structure(I know how to do > that) and then call the http://dojotoolkit.org/pipermail/dojo-interest/2006-July/012841.htmlHOME |
success: true,
tree1: [tree1 data],
tree2: [tree1 data],
tree3: [tree1 data],
tree4: [tree1 data], Suffering from Information Deficit Disorder:: json["orchard"]["trees"][0]["fruits"][1]. Equivalent to the fourth fruit object in the fruits collection in the first tree in the trees collection of the http://www.chiefmillso.com/blog/HOME | Rent A Coder - Visualize a tree-structure (given as JSON data :: Sep 22, 2008 The data for the tree-structure is provided as a JSON dataset. The data contains the title for the node, the type and the id of the node and http://www.rentacoder.com/RentACoder/misc/BidRequests/ShowBidRequest.asp?lngBidRequestId=1006225HOME |
tree5: [tree1 data]
How do I take a stub of this JSON and feed it to a tree?
Using 2.0, btw
I'd appreciate an example of doing that. I also have a bundle of trees that I'm loading up on first page load, and it'd be nice to consolidate them.
Get your json with an Ext.Ajax call.
You can assemble the trees from there tres simple.
In my app I create the tree panel, a root node with the children I got via json.
I'm doing 2 trees, not 5, but the idea is the same.
--dan
edit: didn't notice the 2.0 bit. Can't comment on 2.0, but this works in 1.1.
I Am a Sinner – What About You?
Global Sourcing and Supplier Online by Dylan
|