2014-01-08 37 views
0

這確實是有線的。我在TabPanel中有一個選項卡,每次用戶點擊時都要刷新它。在標籤中應該有一個事物清單。當我試圖將列表添加到面板(選項卡容器)時,它只是不顯示!當我嘗試添加他們通常的其他東西!嘗試添加()到標籤時,Sencha列表未顯示

例如:

var listConfiguration = this.getListConfiguration(); 
var myPanel = Ext.create('Ext.Panel', { 
    html: 'This will be added to a Container' 
}); 

Ext.getCmp('Peoplebutton').add(listConfiguration); 
Ext.getCmp('Peoplebutton').add(myPanel); 

此代碼完全得到HTML的地方!但列表不顯示!該列表的代碼工作正常,我已經檢查了好幾遍...... 我會很高興,如果有人能幫助我(:

清單代碼,確保

getListConfiguration: function() { 
    var store = Ext.create('Ext.data.Store', { 
     fields: ['firstName', 'lastName'], 
     sorters: 'firstName', 
     autoLoad: true, 
     grouper: { 
      groupFn: function(record) { 
       return record.get('firstName')[0]; 
      } 
     }, 

     proxy: { 
      type: 'ajax', 
      url: 'contacts.json' 
     } 
    }); 
    return { 
     xtype: 'list', 
     id: 'list', 
     itemTpl: '{firstName} ,{lastName}', 
     grouped: true, 
     indexBar: true, 
     infinite: true, 
     useSimpleItems: true, 
     variableHeights: true, 
     striped: true, 
     ui: 'round', 
     store: store 
    }; 
} 
+0

所以爲t他包含列表得到生成的標籤,但列表本身不出現? – chinabuffet

+0

是的。解決下回答 –

回答

0

它應該工作正常與List組件的高度的問題

嘗試增加一個固定高度的列表,或者也許柔性:1.

希望它helps-

+0

非常感謝!!!!有用!!!我將高度設置爲100%,並且工作正常!謝謝你的男人! –

+0

很高興聽到 - 請接受答案和/或upvote! –

+0

接受,謝謝你 –