Monday, May 2, 2011

Winner - Lazy Loading Tree with the Force.com JavaScript REST Toolkit Challenge

Timothyainman's submission for our Lazy Loading Tree challenge more that met the requirements. He even included a Visualforce component for extra credit.

One of the problems with tree components is that they can quickly suck up query limits due to their recursive nature. Timothyainman's tree uses the JavaScript REST toolkit to load nodes in the tree as needed. When the Visualforce page loads, the tree component queries for and loads the first and second level nodes in the tree. Nodes with child elements display as a folder. Expanding a folder causes the tree to use the Force.com JavaScript REST Toolkit to fetch the next level of nodes and display them accordingly.

1 comment: