传递javascript数组到新的ExtJS弹出窗口
Passing javascript array to new ExtJS popup window
我一直在尝试将图像数组作为参数传递给新的ExtJS弹出窗口。我在下面的链接
中找到了这个Extjs向窗口传递参数
但是当我在我的应用程序中尝试这个时,它显示未定义。下面是我的代码。
this.btnControlPDF = Ext.create('Ext.button.Button', {
width: 40,
height:33,
border:0,
disabled : false,
style: 'margin: 13px 1px 1px 5px;',
cls : 'icon-button-ControllListButtonPDF',
enableToggle: true,
toggleGroup: 'AccumulateToolButtons',
handler : function(myButton) {
this.reportWindow = Ext.create('Ext.view.ReportExportView');
this.reportWindow.myExtraParams = { imgArray : imgArray };
this.reportWindow.show();
return;
}
});
Ext.view.ReportExportView扩展Ext.window.Window
我想要的是一种方法来传递一个javascript数组变量到新的ExtJS弹出窗口,并能够访问该窗口中的变量。
我找到HTML5 localStorage.getItem()。我可以用这个来存储我的数组吗?
谢谢!斯图
我希望您希望在ReportExportView窗口内访问myExtraParams
数据,也可以从this.reportWindow
访问。如果是的话,试试下面的代码。
this.reportWindow = Ext.create('Ext.view.ReportExportView', {
myExtraParams : { imgArray : imgArray }
} });
this.reportWindow.show();
从ReportExportView
访问myExtraParams
的方法。
Ext.define('Ext.view.ReportExportView', {
extend: 'Ext.window.Window',
alias: 'widget.reportwindoww',
width: 500,
height: 250,
layout: 'fit',
initComponent: function(){
console.log(this.myExtraParams);
//You can write the remaining code here.
this.items = [{
xtype: 'panel',
...............
...............
}];
this.callParent(arguments);
}
});
相关文章:
- Extjs 4在父窗口关闭时保存checkboxGroup的状态
- 使用YUI或ExtJS将隐藏的DIV变成一个窗口
- 关于在extjs窗口组件中检测拖动
- ExtJS 4-在调整窗口大小时,溢出的工具栏会失去控制器
- EXTJS 4.2:点击按钮,在新窗口中将选定的网格行从一个网格复制到另一个网格
- ExtJS 3.4 列在窗口最大化时未完全展开
- 如何仅使用表单面板在 ExtJS 中打开弹出窗口
- EXTJS 窗口/面板关闭错误
- ExtJS 4.2.1 用于加载指示和模态窗口的不同 CSS 掩码
- ExtJS 窗口不起作用
- 具有多个网格和组合的hbox/vbox布局的ExtJS窗口在Internet Explorer上渲染得非常慢
- ExtJS 5 - 将网格中双击的单元格的值传递到新窗口
- Extjs 窗口在 IE 中不能很好地显示元素
- 如何在显示extjs窗口后调用jQuery
- extjs 窗口项样式
- 如何在ExtJS窗口中触发将事件移动到某个x或y位置
- 如何在sencha-extjs窗口中获取iframe
- 使用jQuery的ExtJS窗口动画
- ExtJs窗口不显示
- 如何设置ExtJS窗口显示/隐藏与动画