On Mon, Apr 29, 2013 at 2:14 PM, franck34 <[email protected]> wrote:
> Hi
>
> I'm using treevirtual because my tree can be big.
>
> Leafs will be loaded when the user click on a branch.
>
> I'm at the point to make it with an old school maner, i mean, webservices
> (rest) to fetch data for a particular branch (output = json) and then
> populate the tree using addBranch/addLeaf.
>
It is probably must faster to load the data in a bulk fashion.
SimpleTreeDataModel has a method setData(), documented as:
/**
* Sets the whole data en bulk, or notifies the data model that node
* modifications are complete.
*
* @param nodeArr {Array | null}
* Pass either an Array of node objects, or null.
*
* If non-null, nodeArr is an array of node objects containing the
* entire tree to be displayed. If loading the whole data en bulk in
* this way, it is assumed that the data is correct! No error
checking
* or validation is done. You'd better know what you're doing!
Caveat
* emptor.
*
*
* If nodeArr is null, then this call is a notification that the user
* has completed building or modifying a tree by issuing a series of
* calls to {@link #addBranch} and/or {@link #addLeaf}.
*
*
* @throws {Error} If the parameter has the wrong type.
*/
Derrell
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel