PDA

View Full Version : [1.1.1] Toolbar disappears on ContentPanel.load calls



immu2k1
8 Nov 2007, 1:45 PM
This issue happens in both IE and Firefox. I posted a more detailed description in the Help category: http://extjs.com/forum/showthread.php?t=17639

However, I have a feeling this is a behavior bug. No errors or stack traces are thrown, but logically the Toolbar shouldn't disappear.

immu2k1
8 Nov 2007, 1:56 PM
Below is a code snippet:



var toolBar = new Ext.Toolbar(toolbarId);
toolBar.add({
id:'close-toolbar-btn',
icon: 'images/icon_close.gif',
cls: 'x-btn-text-icon',
text: 'Close',
handler: function(){
alert("will close");
},
tooltip: 'Close this Panel'
});

// the variables iframeDiv, panelTitle etc. are all declared before this snippet.
var newContentPanel = new Ext.ContentPanel(divTag, {title: panelTitle, fitToFrame: true, autoScroll: true, resizeEl: iframeDiv, toolbar: toolBar});
layout.add('center', newContentPanel);

// optionValue contains the url. This loads correctly, but the toolbar disappears!
// If newContentPanel.setUrl is used, the toolbar exists.
newContentPanel.load({url: optionValue, scripts: true, text: "Loading..."});

Hani79
12 Dec 2007, 10:55 PM
It's been several months since you posted this - so I'm hoping you found a solution. I'm having the same exact problem that you described (but with 2.0). Any guidance would be appreciated!

Hani79
13 Dec 2007, 12:16 AM
Nevermind. Figured it out. In case anyone else is having this problem, make sure that the element you're trying to load the data from the URL to isn't the TabPanel itself, but rather an item within the panel. That did the trick for me.