View Full Version : How to load tab contents on request (similar to Ext docs)

25 Nov 2007, 2:40 AM
I want to replicate the behavior of Ext docs (http://extjs.com/deploy/dev/docs/) Specifically, assume I have a navigation tree on the left and when I click on some link within this tree I want the contents of my tab to be loaded. How do I do it? Or how is it done on docs page?

25 Nov 2007, 3:46 AM

25 Nov 2007, 3:52 AM
get center tabpanel
add a new panel & load content

var cp = Ext.getCmp('centerPanel'); //center tabpanel
cp.add(new Ext.Panel({
autoLoad : 'somecontent.php' //file to load

25 Nov 2007, 5:22 AM
Great thanks!

27 Nov 2007, 6:35 AM
Now when I've made a little research on this, i've found something that needs clarification.
autoLoad property works great only for pages that generate pure html. This is fair for docs section as well - autoLoad just loads html files.

Got to two questions in that case.
Is that possible to somehow send items data just in the same way it is done by Ext.tree.TreeLoader class for TreePanel but for the Panel class?
If Q1 is impossible, then how to load html page with Ext code (that would properly render) into the Panel