2013-04-15 86 views
0

更新: 我發現,如果做到這一點列表視圖不顯示在面板

this.add([topToolbar, { 
     xtype: "fieldset", 
     items: [showNameEditor, textEditor] 
    }, 
    showsList, bottomToolbar 
]); 

layout: { 
    type: 'fit' 
} 

然後列表顯示,但文本框不會出現

原文:

我想獲得一個列表,以顯示在我的面板中的兩個textFields顯示,但列表做沒有出現。我嘗試了不同的商店,但仍然沒有顯示。

var showNameEditor = { 
    xtype: 'textfield', 
    name: 'name', 
    label: 'Name', 
    required: true 
}; 
var textEditor = { 
    xtype: 'textfield', 
    name: 'name', 
    label: 'Name', 
    required: true 
}; 
var showsList = { 
    xtype: 'list', 
    title: 'Sample', 
    itemTpl: '{title}', 
    data: [{ 
      title: 'Item 1' 
     }, { 
      title: 'Item 2' 
     }, { 
      title: 'Item 3' 
     }, { 
      title: 'Item 4' 
     } 
    ] 
}; 

this.add([topToolbar, { 
     xtype: "fieldset", 
     items: [showNameEditor, showsList, textEditor] 
    }, 
    bottomToolbar 
]); 

回答

1

你必須爲fieldset & form指定尺寸,如果你想顯示自己的內容,以便使用width & height CONFIGS