繁体   English   中英

TypeError:b为空extjs4

[英]TypeError: b is null extjs4

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

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

这是我的解决方案:

定义活动网格

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
                                         }
                                      ]
                                  }
                              ]
                          });
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM