PDA

View Full Version : list: items detailcard missed after come back



myput
24 Oct 2011, 7:49 AM
Hello,

i have a problem with my list.
When i click on an item since my list, i obtain my detailcard, and display some buttons with items: []
but when i go back to my list with the back button and click on the item again, the button missed ....



WPApp.views.DirectoryItemListDetailToolbar = new Ext.Toolbar ({
title: 'Item',
items: [{
text: 'Retour',
ui: 'back',
handler: function() {
WPApp.views.DirectoryItemListContainer.setActiveItem(WPApp.views.DirectoryListItemPanel);
}
}]
});


WPApp.views.DirectoryDetailPanel = new Ext.Panel ({
dockedItems: [WPApp.views.DirectoryItemListDetailToolbar],
fullscreen: true,
tpl: '{name}',
items: [
{
xtype: 'button',
ui: 'round',
margin: 15,
flex: 1,
text: 'desciption'
}
],
});


WPApp.views.DirectoryListItemPanel = new Ext.List ({
fullscreen: true,
itemTpl: '{name}',
store: WPApp.stores.DirectoryItemListListStore,
listeners: {
itemtap: function(view, index) {
var record = WPApp.views.DirectoryListItemPanel.getStore().getAt(index);
WPApp.views.DirectoryDetailPanel.update(record.data);
WPApp.views.DirectoryItemListContainer.setActiveItem(WPApp.views.DirectoryDetailPanel, {animation: {type:'flip'}});
}
},
});


WPApp.views.DirectoryItemListContainer = new Ext.Panel ({
id: 'WPApp.views.DirectoryItemListContainer',
fullscreen: true,
layout: 'card',
items: [WPApp.views.DirectoryListItemPanel, WPApp.views.DirectoryDetailPanel],
});




if in the detailcard i have a tpl like '{name}', i can display name, get back and come back and it's ok.
But for the items, nothing workj, my button missed after the first time ...

Any ideas please?