Configuration required to get Sencha ExtJS TreeGrid example working

假如想象 提交于 2019-11-26 14:48:10

问题


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


回答1:


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




回答2:


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"


来源:https://stackoverflow.com/questions/9058921/configuration-required-to-get-sencha-extjs-treegrid-example-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!