将 ExtJS4 组件添加到 ExtJS3 组件中?
我有一个 ExtJS3 应用程序,可以受益于 ExtJS4 SVG 内容。网上有一个示例说明如何使用沙箱模式以在 ExtJS3 应用程序中包含 ExtJS4 组件...但在示例中,ExtJS4 组件位于其自己的浮动 window,因此 ExtJS4 组件并没有真正添加到 ExtJS3 组件中;它们只是共存而不是独立。
有没有办法在沙箱模式下运行时将 ExtJS4 组件添加到 ExtJS3 组件?例如:
var item = Ext4.create("Ext.panel.Panel", { // ExtJS4
/* config */
});
var parent = new Ext.Panel({ // ExtJS3
items:[item],
/* more config */
});
如果我尝试这样的事情,我通常会收到类似的错误...
this.container is null (http://localhost:4000/path/ext-4.0.0/builds/ext-all-sandbox-debug.js:27723)
I've got an ExtJS3 application which could benefit from the ExtJS4 SVG stuffs. Online there is an example of how to use sandbox mode to include ExtJS4 components in an ExtJS3 application... but in the example the ExtJS4 components are in their own floating window, so the ExtJS4 components aren't really added to ExtJS3 components; they just co-exist rather independently.
Is there a way to add an ExtJS4 component to an ExtJS3 component while running in sandbox mode? For example:
var item = Ext4.create("Ext.panel.Panel", { // ExtJS4
/* config */
});
var parent = new Ext.Panel({ // ExtJS3
items:[item],
/* more config */
});
If I try something like this, I usually get an error like...
this.container is null (http://localhost:4000/path/ext-4.0.0/builds/ext-all-sandbox-debug.js:27723)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
似乎某些 Ext4 组件可以在 Ext3 组件中
renderTo
DOM 元素,但效果有限:这似乎在 Ext3 项目中使用 Ext4 图表时最有用。
引用:
It would seem that some Ext4 components can
renderTo
DOM elements in Ext3 components, with limited success:This seems to be most useful when using Ext4 charts in an Ext3 project.
Citations:
我认为你所做的事情是不可能的。 ExtJS 4 有一个全新的渲染引擎,因此它正在寻找一个不存在的布局容器。
你最好从 ExtJS 3 迁移 -> 4.
I don't think what you're doing is possible. ExtJS 4 has a completely new rendering engine, and so it's looking for a layout container that doesn't exist.
You'd be far better off migrating from ExtJS 3 -> 4.