Lazy Loading Tree with the JavaScript REST Toolkit
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Lazy Loading Tree with the JavaScript REST Toolkit

Challenge end date: Tue Apr 26 01:00:00 GMT 2011

We’d like to build a JavaScript tree component for Visualforce that lazily loads its nodes using the JavaScript REST Toolkit.

<p><a href="" target="_blank">Pat Patterson</a>, Developer Evangelist, just released the <a href="" target="_blank"> JavaScript REST Toolkit</a>. The toolkit allows JavaScript in Visualforce pages to call the REST API via the Ajax Proxy, providing an easy-to-use JavaScript wrapper. We’d like to use this toolkit as a basis for the tree component.</p> <p>The component should use an existing tree component such as, but not limited to, <a href="" target="_blank">jsTree</a> (jQuery), <a href="" target="_blank">dijit Tree</a> (Dojo) or <a href="" target="_blank">XML Tree Loader</a> (Ext JS). Use a single custom object to model the data used by the tree with a parent/child relationship.</p> <p>When the Visualforce page load, the tree component should query for and load the first and second level nodes. Nodes with child elements should display as a folder. Expanding a folder causes the tree to use the JavaScript REST Toolkit to fetch the next level of nodes and display them accordingly.</p> <p>Create a custom object with a reference to itself to model the hierarchy.</p> <p>Selecting any of the nodes opens the record in a new window.</p> <p>Extra credit for making the tree available as a Visualforce component.</p>