If I understand correctly, then deferredRender ensures that the contet is available in an other tab.
But what's next?
Here my code for the different tabs:
First tab:
Code:
......
artikelGrid = Ext.create ("Ext.grid.Panel" , {
//width : 300,
//title : "Benutzerdaten",
store : store_benutzer,
autoScroll : true,
features: [{ftype:'grouping'}],
frame:true,
dockedItems: [{
xtype: 'toolbar',
items: [{
iconCls: 'icon-add',
text: 'Neu',
scope: this,
//handler: this.onAddClick
}, {
iconCls: 'icon-delete',
text: 'Löschen',
disabled: true,
itemId: 'delete',
scope: this,
//handler: this.onDeleteClick
}]
}],
columns:[
{header:"Benutzername",dataIndex:"user_name", flex:1},
{header:"Recht",dataIndex:"rechte", flex:1},
{header:"Erstellung",dataIndex:"datum", flex:1}
]
});
second tab:
Code:
.......
artikelGrid = Ext.create ("Ext.grid.Panel" , {
//width : 300,
//title : "Benutzerdaten",
store : store_benutzer3,
autoScroll : true,
selType: 'rowmodel',
features: [{ftype:'grouping'}],
frame:true,
columns:[
{header:"Benutzername",dataIndex:"user_name", flex:1},
{header:"Recht",dataIndex:"rechte", flex:1},
{header:"Erstellung",dataIndex:"datum", flex:1}
],
listeners: {
selectionchange: function(model,records){
var frage = Ext.MessageBox.show({
title:'Bestätigung',
//msg: action.result.message,
modal:true,
icon:Ext.Msg.QUESTION,
msg: "Soll der Benutzer wirklich gelöscht werden?",
buttons:Ext.Msg.YESNO,
buttonText: {yes : 'Ja'},
fn: function(btn){
if (btn == 'yes'){
Ext.Ajax.request({
url:"includes/benutzerdaten_loeschen.php",
params: records[0].data
});
store_benutzer3.remove(records);
Ext.MessageBox.close(frage);
if (typeof tabbenutzer !== 'undefined') {
console.log('Hier bin ich');tabPanel.destroy(tabbenutzer);}
//if (typeof tabbenutzer !== 'undefined') {tabbenutzer.getUpdater();}
}
}
})}
}
}
And Output:
Code:
.....
tab = Ext.create('Ext.panel.Panel', {
//html: nodeText + ' Content Here',
itemId: tabId,
title: nodeText,
closable:true,
deferredRender : false,
items: [artikelGrid]
});
tabPanel.add(tab);
}
// set the tab as active/on-top.
tabPanel.setActiveTab(tab);
}
},
store: treeStore,
width: 200
});