O'Reilly logo

Enterprise Application Development with Ext JS and Spring by Gerald Gierer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dynamically loading tree nodes

Enterprise applications usually have data sets that prohibit the loading of the full tree in a single JSON request. Large trees can be configured to load children on a per node basis by expanding levels on demand. A few minor changes to our code can allow us to implement this dynamic loading of node children.

When a node is expanded, the tree store proxy submits a request that contains a node parameter with the ID of the node being expanded. The URL submitted is that which is configured in the proxy. We will change our tree store proxy as follows:

proxy: {
  type: 'ajax',
  url: 'company/treenode.json'
}

Note that the URL of the proxy has been changed to treenode. This mapping, when implemented in CompanyHandler, will load ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required