【问题标题】:TypeError: b is null extjs4类型错误:b 为空 extjs4
【发布时间】:2013-03-07 23:09:47
【问题描述】:

我的应用程序有一个网格,双击记录会出现一个窗口。在这个窗口中有两个选项卡,在第一个选项卡中,我打印一个包含所选行的所有信息的表格,在第二个选项卡中,我有另一个与另一个商店链接的网格,显示一种“记录器”来查看选定的行。我的问题是,当我双击一行时,会出现窗口并且活动商店已完美加载。但是如果我关闭窗口,然后双击另一行,则“活动”选项卡为空,错误为TypeError: b is null

编辑:已解决,我只创建了一次网格,每次创建窗口时都必须创建网格

【问题讨论】:

  • 请发表您的答案并标记为明天接受。

标签: extjs null grid store


【解决方案1】:

这是我的解决方案:

定义活动网格

Ext.define('Beautyeco.actGrid', {
                extend: 'Ext.grid.Panel',

                title: '',
                minHeight: 200,
                maxHeight: 300,
                store: actStore,
                id: 'actGrid',

                initComponent: function() {
                    this.columns = [ //columns ]
                    this.callParent(arguments);
                }
            });

双击监听

itemdblclick: function(tablepanel, record, item, index, e, options){
                        // create here the grid
                        var activitiesGrid = Ext.create('Beautyeco.actGrid');

                        var editWindow = new Ext.Window({
                            title: 'Modifica informazioni',
                            width: 600,
                            minHeight: 400,
                            items: [
                                {
                                    xtype: 'tabpanel',
                                    activeTab: 0,
                                    items: [
                                        {
                                            title: 'Info generali',
                                            id: 'infoTab',
                                            width: 600,
                                            tpl: [ //tpl ]
                                        },
                                        {
                                            title: 'Attività',
                                            width: 600,
                                            id: 'actTab',
                                            items: [activitiesGrid] // add the grid
                                         }
                                      ]
                                  }
                              ]
                          });
}

【讨论】:

    猜你喜欢
    • 2014-01-10
    • 1970-01-01
    • 2015-03-06
    • 2013-07-20
    • 2020-06-21
    • 1970-01-01
    • 2013-11-29
    • 2012-06-13
    相关资源
    最近更新 更多