Mar 22, 2018, 7:48 AM
[CLOSED] TabPanel1 .RemoveAll throwing a javascript error
Hello,
I have a tabpanel that has several panels. on each request I want to remove all panels in this TabPanel and add different panels.
I tried TabPanel1.RemoveAll(); from codebehind it throw a javascript error "Cannot read property 'removeAttribute' of null" even when I tried to do it in Javascript (App.TabPanel1.removeAll();) throw the same error.
It works 3 to 4 times and then it throw this error in console.
Note: I am creating the panels and adding them to the TabPanel1 in javascript
Please any advice?
Thank you
I have a tabpanel that has several panels. on each request I want to remove all panels in this TabPanel and add different panels.
I tried TabPanel1.RemoveAll(); from codebehind it throw a javascript error "Cannot read property 'removeAttribute' of null" even when I tried to do it in Javascript (App.TabPanel1.removeAll();) throw the same error.
It works 3 to 4 times and then it throw this error in console.
Note: I am creating the panels and adding them to the TabPanel1 in javascript
for (var i = 0; i < tabs.length; i++) {
var pid = "panel" + i;
var panel = Ext.create('Ext.panel.Panel', {
title: tabs[i],
id: pid,
flex: 1,
layout: 'fit',
});
App.TabPanel1.add(panel);
}
Please any advice?
Thank you
Last edited by fabricio.murta; Apr 27, 2018 at 2:40 PM.