4

TabPanel のタブ内にリストを表示しようとしています。リストを表示するだけでは問題なく動作しますが、TabPanel 内に配置すると表示されません。

起動イベントでこのコードを使用すると表示されます。

Ext.create('Ext.List', {
           fullscreen: true,
           itemTpl: '<div class="contact">{ID} <strong>{Name}</strong></div>',
           store: cityStore
        });

このコードを使用すると、表示されません (タブは必要に応じて表示されます)。また、アイテム内に Ext.create リストを含めてみましたが、結果は同じです。

       Ext.create('Ext.TabPanel',{
            fullscreen: true,
            tabBarPosition: 'bottom',
            scrollable: true,
            items: [
                {
                    title: 'Home',
                    iconCls: 'home',
                    html: ['Welcome to my Pizza!'].join(""),
                    style: 'text-align: center;'
                },
                {
                    title: 'Search',
                    iconCls: 'search',
                    items: [
                          Ext.create('Ext.List', {
                              fullscreen: true,
                              itemTpl: '<div class="contact">{ID} <strong>{Name}</strong></div>',
                              store: cityStore
                          })
                    ]
                },
                {
                    xtype: 'toolbar',
                    title: 'Pizza',
                    dock: 'top'
                }
            ]
        }).setActiveItem(1); // this is set for debugging only

何が間違っている可能性がありますか?ありがとう!

4

1 に答える 1

5

Sencha フォーラムで解決された問題:

パネル内にリストをネストしています。ネストを解除してみてください:

コード:

Ext.create('Ext.tab.Panel',{
    fullscreen: true,
    tabBarPosition: 'bottom',
    scrollable: true,
    items: [
        {
            title: 'Home',
            iconCls: 'home',
            html: ['Welcome to my Pizza!'].join(""),
            style: 'text-align: center;'
        },
        {
            xtype: 'list',
            title: 'Search',
            iconCls: 'search',
            store: cityStore,
            itemTpl: '<div class="contact">{ID} <strong>{Name}</strong></div>'
        },
        {
            xtype: 'toolbar',
            title: 'Pizza',
            dock: 'top'
        }
    ]
}).setActiveItem(1);
于 2012-01-06T15:49:04.540 に答える