Configuration required to get Sencha ExtJS TreeGrid example working

4.9k views Asked by At

Can someone help explain what configuration I'm missing to get the Sencha Ext JS 4 framework TreeGrid sample working?

Here's what I've done so far:

Downloads:
http://php.iis.net > click "PHP on Windows" > install "PHP53.exe"
http://www.sencha.com > click "Products" > click "EXT JS 4" > extract zip file code and place into C:\source\ext-4.0.7-gpl

Turned on IIS 7 in Windows 7 Programs and Features

Created IIS 7 website in Windows 7:
- set physical path of website to "C:\source\ext-4.0.7-gpl" (setting root of site to *\docs seemed to break some of the examples)
- I didn't set any special bindings (just port 80) .. localhost is implied without setting it

To try and view the example, I did the following:
- navigate to http://localhost > click "View the Examples" > Scroll down to "Trees" section - notice that the "Drag and Drop Reordering", "Multiple Trees", and "XML Tree" work in this section when you have PHP installed, but the "Tree Grid" and "Check Tree" do not. I'm mostly interested in the "TreeGrid".

What am I missing in my configuration or setup?

=========================================================

2/13/2012 @10:51pm

I thought I had this one solved, but apparently not. I left this project be for awhile, so I didn't confirm the answer. The treegrid.json file is definitely there, and it matches the file on the sencha.com extjs tree grid example json file.

Here is the URL to my tree grid example (copied from Sencha's example):

http://24.177.214.232:8888/examples/tree/treegrid.html

Here is the URL to the Sencha.com tree grid example:

http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/tree/treegrid.html

2

There are 2 answers

0
JustBeingHelpful On BEST ANSWER

Apart from the other configuration described, I had to go into IIS and do the following before the Tree Grid worked:

  • click on the new site
  • click on MIME types
  • right click in open space > Add > File name extension: "json" ... MIME Type: "application/x-javascript"
5
maialithar On

if you inspect treegrid.js you'll see that it requires treegrid.json (JSON-formatted data file). when you visit http://24.177.214.232:8888/examples/tree/treegrid.json (which is the path where treegrid.js expects treegrid.json) you'll see, that there is no such file.

fix the path or create a data file : )

EDIT you can find proper JSON here: http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/tree/treegrid.json