n3b
22 Apr 2009, 6:53 AM
:s my third time here in as many days. I'm sure this will get easier...
I have a TabPanel which gets a panel added during run. The panel has it's contents replaced using an Ext.Template - or at least, that's what should happen.
Using firebug I set a breakpoint before the panel gets added to the TabPanel and I see the panel has an innerHTML element with the required text. However, it goes to screen and nadda.
// User is already configured and known good
// tbPnl is the preconfigured TabPanel
var adPnl = new Ext.Panel({
id: 'adPnl',
title: 'user',
autoHeight: true,
autoWidth: true});
var adTpl = new Ext.Template(
'<p>name: {name}</p>',
'<p>something: {something}</p>');
adTpl.overwrite(adPnl, User);
//adTpl.overwrite(adPnl.body, User); //doesn't work.
tbPnl.add(adPnl);
// at this point I see innerHTML on adPnl with my values filled out
tbPnl.setActiveTab(adPnl);
// the tab appears with the header but no data. Not in the panel and not in the rendered HTML
The example here http://extjs.com/deploy/dev/examples/core/templates.html (http://extjs.com/forum/../deploy/dev/examples/core/templates.html) suggests passing in the panel.body to the overwrite function but this causes an 'el undefined' error.
I need a fresh set of eyes on this :) Mine have gone wonky...
Cheers!
I have a TabPanel which gets a panel added during run. The panel has it's contents replaced using an Ext.Template - or at least, that's what should happen.
Using firebug I set a breakpoint before the panel gets added to the TabPanel and I see the panel has an innerHTML element with the required text. However, it goes to screen and nadda.
// User is already configured and known good
// tbPnl is the preconfigured TabPanel
var adPnl = new Ext.Panel({
id: 'adPnl',
title: 'user',
autoHeight: true,
autoWidth: true});
var adTpl = new Ext.Template(
'<p>name: {name}</p>',
'<p>something: {something}</p>');
adTpl.overwrite(adPnl, User);
//adTpl.overwrite(adPnl.body, User); //doesn't work.
tbPnl.add(adPnl);
// at this point I see innerHTML on adPnl with my values filled out
tbPnl.setActiveTab(adPnl);
// the tab appears with the header but no data. Not in the panel and not in the rendered HTML
The example here http://extjs.com/deploy/dev/examples/core/templates.html (http://extjs.com/forum/../deploy/dev/examples/core/templates.html) suggests passing in the panel.body to the overwrite function but this causes an 'el undefined' error.
I need a fresh set of eyes on this :) Mine have gone wonky...
Cheers!