ExtJS 4 到 ExtJS 5 的迁移 [英] ExtJS 4 to ExtJS 5 migration

查看:35
本文介绍了ExtJS 4 到 ExtJS 5 的迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将 Web 应用程序从 ExtJS 4 迁移到 ExtJS 5.

We are migrating a web application from ExtJS 4 to ExtJS 5.

测试 index.html 导致以下错误(由 Firefox-FireBug-console 输出):

Testing the index.html results in the following error (outputted by the Firefox-FireBug-console):

NetworkError: 404 Not Found - http://localhost:8080/ext/build/examples/ux/grid/FiltersFeature.js?_dc=1414147197935

我已经在目录中搜索了 FilterFeatures.js 文件,但它不在那里.

I have already searched for the FilterFeatures.js-file inside the directory, but it isn't there.

根据 ExtJS 5.0 中的新功能"站点 这个文件非常受欢迎,以至于他们认为移动它是明智的.

According to the "Whats New in ExtJS 5.0"-site this file was so popular, that they thought it would be wise to move it.

谁能告诉我如何包含此文件或功能,以便错误消失?

我已经尝试将以下内容添加到我的 app.js 文件中:

I have already tried to add the following to my app.js file:

Ext.Loader.setPath('Ext.ux', './ext/build/examples/ux');
Ext.application({
    ...
    requires: [
        'Ext.ux.grid.FiltersFeature'
    ],
    ...
});

但是错误仍然存​​在.我想我需要获得一个对一个对象的引用,该对象现在隐藏在其他地方.

But the error persists. I think i need to get a reference to an object that is now hidden somewhere else.

我只是不知道如何引用它,因为我不知道它现在所在的 js 文件,以及如何在 Ext JS 5 中正确地执行它.

I just dont know how to reference it, because i dont know the js-file it is now placed in and how to do it syntactically correct in Ext JS 5.

推荐答案

基础知识在您提供的链接中:

The basics are in the link you provided:

  • 他们删除了功能 Ext.ux.grid.FiltersFeature(ftype:过滤器).
  • 他们引入了一个插件 Ext.grid.filters.Filters (ptype: gridfilters)
    作为增强的替代品.
  • They removed the feature Ext.ux.grid.FiltersFeature (ftype: filters).
  • They introduced a plugin Ext.grid.filters.Filters (ptype: gridfilters)
    as an enhanced replacement.

因此,您将不得不手动重新设计网格以使用新插件而不是旧功能.

So you will have to rework your grids manually to use the new plugin instead of the old feature.

祝你好运.

这篇关于ExtJS 4 到 ExtJS 5 的迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆