aL3xa
aL3xa

Reputation: 36120

ExtJS: load JSON from an external file into TreePanel

You can grab data from here. Instead of saving JSON as a separate variable within the script file, is it possible to create a file pointer, and populate a Tree with one config option? Saving JSON in a variable does the job, but it's quite cumbersome!

Upvotes: 0

Views: 1480

Answers (1)

Lloyd
Lloyd

Reputation: 29668

You can't use files outside of things like AIR it's a security risk and the sandbox won't allow it. You can of course keep the JSON in an external file and request it through HTTP using a TreeLoader with AsyncTreeNode and preloading children OR simply evaluate the AJAX response yourself.

Upvotes: 1

Related Questions