簡體   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