0
在列表中選擇新建視圖中選擇或披露在列表中選擇新建視圖中選擇或披露
我認爲有很多方法來處理功能選擇或披露名單上。我在sencha的文檔中看到了Vimeo教程。但是,如果可能的話,我不想使用controller.js,因爲我只有2或3個項目。
當我點擊物品或透露時,如何推送視圖?我什麼都試過ext.create,Ext.ComponentManager.get( 'listdetails')推動(...在那裏我有一個的xtype listdetails.js: 'listdetails'
幫助和感謝^^
。Main.js
Ext.define('easylist.view.Main', {
extend: 'Ext.tab.Panel',
requires: [
'Ext.navigation.View',
'Ext.dataview.List',
'Ext.data.Store'
],
config: {
items: [
{
xtype: 'container',
title: 'Tab 1',
iconCls: 'info'
},
{
xtype: 'container',
title: 'Tab 2',
iconCls: 'info'
},
{
xtype: 'container',
title: 'Tab 3',
iconCls: 'info'
},
{
xtype: 'navigationview',
title: 'MyNavigationView',
iconCls: 'info',
items: [
{
xtype: 'list',
title: 'uyuyuy',
store: {
fields: ['name'],
data: [
{name: 'Cowper'},
{name: 'Everett'},
{name: 'University'}
]
},
onItemDisclosure: true,
itemTpl: '{name}',
listeners: {
select: function(view, record) {
navview = view.up('navigationview'),
navview.push({How can I view lisdetail1.js or 2, or 3 depending onselect?????})
},
// disclose: function(view, record) {
// Ext.Msg.alert('Selected!', 'You selected ' + //record.get('name'));
// }
}
}
]
}
],
tabBar: {
docked: 'bottom'
}
}
});
謝謝,但是我怎樣才能銷燬先前的視圖?例如,我的新的帶有底部tabbar的navigaiton視圖不顯示(對於延遲,有很多工作感到抱歉) – Huberte
爲什麼你想破壞以前的視圖? container.destroy() –