View Full Version : load on demand

11 Jun 2012, 3:07 AM

I'm looking for loading panels / containers on demand / on the fly.

Example: I push a button and the panel on the right should load a grid.

Main reason : I do not wish to affect the application with perhaps a faulty sub-panel.

Can somebody point me into the direction where I should start reading?

11 Jun 2012, 3:28 AM
the gird is in the panel or outside the panel?
if the gird is in the panel but data should load by push button, you can use lazzy load.
if the gird in a new panel outside the present panel, you can create a autoload gridpanel.

11 Jun 2012, 4:32 AM
If you're trying to avoid halting the main application on the loaded panel's errors, you could do it in an iframe. That will prevent any errors that halt JavaScript from breaking your container app, but might make communicating information between the two a little more complicated.

//Add a display contianer the right side of your app
var displayContainer = Ext.create('Ext.container.Container');

//Add this to the click event handler function for the button you mentioned
var url= 'domain/panelBuilder/page.php';
var iframe = '<iframe src="' + url+ '" width="100%" height="100%"></iframe>'

11 Jun 2012, 4:46 AM
Thnx, that was the angle i was looking for.