为什么extjs在渲染元素时调用刷新URL?

时间:2014-06-26 10:19:12

标签: javascript extjs extjs4

我正在创建一个组件,然后将其呈现给DOM对象(div)。

    //create component
    this.p = this.createTablePanel();

    //add it to the DIV
    this.p.render(paveDIV);

一切正常,只是我的控制台出现了一个奇怪的错误。它似乎想要转到名为“刷新”的URL。

GET http://this_is_where_my_local_is:8080/myWebSite/refresh 404 (Not Found)

这是在ExtJS内部创建的:

GET http://lokalllhost:8080/creationWWW/refresh 404 (Not Found) ext-all-debug.js:13457 Ext.override.getStyle ext-all-debug.js:13457 Ext.override.isStyle ext-all-debug.js:13401 Element.override.fixDisplay ext-all-debug.js:18138 Element.override.setVisible ext-all-debug.js:18078 Base.implement.callParent ext-all-debug.js:4263 Ext.define.setVisible ext-all-debug.js:81417 Element.override.hide ext-all-debug.js:18154 Ext.define.constructor ext-all-debug.js:81198 constructor ext-all-debug.js:4894 Ext.define.constructor ext-all-debug.js:33170 Ext.define.makeFloating

(截图可能看起来更好)

enter image description here

其他一切都很好。只是在控制台中看到这个错误很烦人。

2 个答案:

答案 0 :(得分:1)

问题必须来自其他地方,而不是来自上述代码。此外,建议不要创建组件然后将其呈现在某个位置,通常是通过在items:[]数组中配置组件或调用add()方法将组件添加到容器中。

答案 1 :(得分:1)

一个老问题,但是我在ExtJS 6.5.3中遇到了同样的问题,所以我想分享我的发现。

问题(来自我们的旧代码)来自某个Ext.Template模板,该模板使用了占位符background-image样式的按钮。

<span class="x-button-icon demo-icon icon-search" style="background-image: url(&quot;true&quot;);">

这将为我们提供控制台中的same kind of errors。摆脱它会使错误消失。

ExtJS似乎正在尝试加载background网址,显然失败了。