需要配置,以煎茶的ExtJS的TreeGrid例如工作需要配置,以煎茶的ExtJS的TreeGrid

2019-05-12 11:57发布

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

Answer 1:

如果你检查treegrid.js你会看到,它需要treegrid.json (JSON格式的数据文件)。 当您访问http://24.177.214.232:8888/examples/tree/treegrid.json (这是路径,其中treegrid.js预计treegrid.json ),你会看到,有没有这样的文件。

修复路径或创建数据文件:)

编辑你可以在这里找到合适的JSON: http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/tree/treegrid.json



Answer 2:

除了描述的其它配置,我不得不进入IIS和别树网格工作过如下:

  • 点击新网站
  • 点击MIME类型
  • 右键单击在开放空间>添加>文件扩展名:“JSON” ...... MIME类型:“应用程序/ x-的javascript”


文章来源: Configuration required to get Sencha ExtJS TreeGrid example working