我与 sencha 架构师和 extjs 4.2.0 合作
我需要为 gridPanel 添加一个别名,以便在我的 Controller 中拥有一个引用。
当我尝试创建名为 alias 的自定义属性时:我不能,因为 createAlias 存在并且这会替换 xtype 和错误(名称未定义)。
我想是因为我无法在封装元素中赋予与唯一元素的唯一 View 相反的小部件别名。
我想我的视口(viewport)有一个别名,但是如何获取视口(viewport)元素以及使用它时创建的引用 Controller 的指定函数...
我的视口(viewport)中的网格面板:
{
xtype: 'gridpanel',
id: 'GridUtilisateursApplicatifs',
store: 'UtilisateursApplicatifs',
columns: [
................
}
最佳答案
最好设置 itemId
属性
itemId: "GridUtilisateursApplicatifs"
然后选择您的组件
Ext.ComponentQuery.query("#GridUtilisateursApplicatifs");
关于javascript - 封装元素的 Controller 引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16846955/