mardi 30 décembre 2014

EXTJS3.4 : Uncaught TypeError: Cannot read property 'parentNode' of undefined

HI

If we are closing a tabPanel using closable: true, the default action will be destroying the tabPanel. And so, since the tabPanel is destroyed we wont be able to display the tabPanel again. But, I do not want the tabPanel to be destroyed, it has to be hidden so I tried this



Code:



this.Manage = new Ext.TabPanel({
title: 'Manage',
closable: true,
closeAction: 'hide',
activeTab: 0,
items:[
this.manageGridPanel


]
});

What happens with this is, I am able to display the tabPanel but the child elements within that are not being displayed. And I am getting following exception in js console Uncaught TypeError: Cannot read property 'parentNode' of undefined Also because of this, I am not able to navigate to other tabpanels from my treepanel, I am getting the following exception in js console Uncaught TypeError: Cannot read property 'className' of undefined .

I also tried using the beforeclose event like this in the tabpanel



Code:



listeners: {
'beforeclose': function(panel) {
console.log('TP - beforeclose');
var closeAction = this.ownerCt.closeAction
if (closeAction === 'hide') {
panel.hide();
var el = Ext.get(panel.tabEl);
el._savedWidth = el.getWidth();
el.setWidth(0);
el.setVisible(false);
return false;
}
return true;
}
}

This is how I open the tab panel dynamically,

Code:



if(n.text=='Manage')
{
that.hometabPanel.add(manage.Manage).show();
}

Should I give tab.setVisible(true) ?or what changes should I make for this to work??



EXTJS3.4 : Uncaught TypeError: Cannot read property 'parentNode' of undefined

Aucun commentaire:

Enregistrer un commentaire