Extjs通过单击按钮打开新的Ext.window.window
Extjs opening new Ext.window.Window by clicking a button
我正在尝试编辑名为PartKeeper(v0.1.9(的开源程序。在程序的特定部分,我想添加一个按钮来打开一个新的Ext.window.window。我的代码如下,但不起作用(我对extjs很陌生,但我想我面临着一项艰巨的任务,所以我对从哪里开始学习的所有建议都持开放态度,我只是试图从现有代码中学习,并通过查找可用代码的相似部分来应用一些东西(
Ext.define('PartKeepr.FindWindow',{
extend:'Ext.window.Window',
constrainHeader: true,
title: i18n("Find Number"),
initComponent: function() {
this.okButton=Ext.create("Ext.button.Button",{
text:i18n("OK")});
this.buttons=[this.okButton];
}
});
{
xtype: 'button',
text: i18n("Find"),
name: 'findButton',
handler: Ext.bind(this.findNumber, this)
}
findNumber: function(){
var j = new PartKeepr.FindWindow();
j.show();
}
编辑:当我按下查找按钮时,控制台会给我以下错误:ext all.js:21 Uncaught TypeError:无法读取未定义的属性"insert">
您需要调用超类initComponent方法:
Ext.define('PartKeepr.FindWindow', {
extend: 'Ext.window.Window',
constrainHeader: true,
title: i18n("Find Number"),
initComponent: function() {
this.okButton = Ext.create("Ext.button.Button", {
text: i18n("OK")
});
this.buttons = [this.okButton];
this.callParent();
}
});
相关文章:
- 正在寻找比$(document).ready慢的$(window).load的替代方案
- 直接下载文件,而不是从window.open(url)
- $window.ga在AngularJS事件中未定义
- Extending Ext.data.NodeInterface
- 如何将PDF作为二进制文件传递到window.open()
- window.onload没有'无法在Android WebView中工作
- window.location替换并传递URL历史记录条目中的变量
- window.on.scroll事件未启动
- 禁用鼠标单击网格,当 ext.window 打开 extjs 3
- Ext.Window在显示时窃取表单元素;t隐藏时恢复
- Ext.window 在父类中窗口的关闭按钮上覆盖子类中的销毁
- Ext.Window 在 extjs 3.4 中显示当前打开窗口后面的方法打开窗口
- Ext.window.MessageBox 可拖动 false,调用隐藏方法时出错
- Ext6 /Sencha Build Error with Ext.window.Window
- ExtJs 4 -如何在动态更新可关闭属性时更新Ext.window.Window布局
- 为什么我不能两次显示新的Ext.Window ?
- ExtJS中的控制器职责是什么?Ext.window.Window实例中的事件
- 如何使用“Ext.window”后释放内存.窗口类实例
- Extjs通过单击按钮打开新的Ext.window.window
- Ext Window无法关闭