PDA

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



Royan
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?

evant
25 Nov 2007, 3:46 AM
http://extjs.com/deploy/ext-2.0-rc1/docs/resources/docs.js

jimmyphp
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
.....
}).show();

Royan
25 Nov 2007, 5:22 AM
Great thanks!

Royan
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.
Q1
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?
Q2
If Q1 is impossible, then how to load html page with Ext code (that would properly render) into the Panel