peterpcm3
21 Sep 2012, 1:47 AM
hi,
i create a viewport with tabpanel, but i want when resize viewport to remove items from it and to add new item.
listeners: {
resize: function(viewport){
try
{
viewport.removeAll();
viewport.add(Ext.create('Ext.app.TabPanel'));
viewport.doLayout();
}
catch(e)
{
console.log(e);
}
}
}
Stack trace is:
stack: "Error: An attempt was made to reference a Node in a context where it does not exist"
My question is how can add and remove items when resize viewport without error. I use extjs version 4.0.7
Thanks
i create a viewport with tabpanel, but i want when resize viewport to remove items from it and to add new item.
listeners: {
resize: function(viewport){
try
{
viewport.removeAll();
viewport.add(Ext.create('Ext.app.TabPanel'));
viewport.doLayout();
}
catch(e)
{
console.log(e);
}
}
}
Stack trace is:
stack: "Error: An attempt was made to reference a Node in a context where it does not exist"
My question is how can add and remove items when resize viewport without error. I use extjs version 4.0.7
Thanks