PDA

View Full Version : List Back Button don't Work



myput
13 Oct 2011, 12:39 AM
Hello,

My back button of my list don't work. I use the good writeing i think, but it stay blocked:


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


In directoryListLoad i Have:


WPApp.views.DirectoryListLoad = Ext.extend(Ext.Panel, {
initComponent: function(){
Ext.apply(WPApp.views, {
DirectoryListItemPanel: new WPApp.views.DirectoryListItemPanel(),
});
this.items = [
WPApp.views.DirectoryListItemPanel,
];
WPApp.views.DirectoryListLoad.superclass.initComponent.call(this);
this.doComponentLayout();
}
});

Ext.reg('DirectoryListLoad', WPApp.views.DirectoryListLoad);

And in my List:


WPApp.views.DirectoryListItemPanel = Ext.extend(Ext.List,{
...
store: WPApp.stores.DirectoryItemListListStore,
listeners: {
itemtap: function(view, index) {
var record = WPApp.stores.DirectoryItemListListStore.getAt(index);
WPApp.views.DirectoryDetailPanel.update(record.data);
WPApp.views.DirectoryPanel.setActiveItem(WPApp.views.DirectoryDetailPanel);
}
}
});


And in Directory Panel:


WPApp.views.DirectoryPanel = Ext.extend(Ext.Panel,{
initComponent: function() {
Ext.apply(WPApp.views, {
DirectoryNestedListPanel: new WPApp.views.DirectoryNestedListPanel(),
DirectoryDetailPanel: new WPApp.views.DirectoryDetailPanel()
});
this.items = [
WPApp.views.DirectoryNestedListPanel,
WPApp.views.DirectoryDetailPanel
];
WPApp.views.DirectoryPanel.superclass.initComponent.call(this);
this.doComponentLayout();
}
});


Ext.reg('DirectoryPanel', WPApp.views.DirectoryPanel);


I don't know why i have this bug ...

myput
13 Oct 2011, 11:08 PM
any idea ? :(