ExtJS (4.0) dynamic / lazy loading

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2012-07-06T21:12:35Z Indexed on 2012/07/06 21:15 UTC
Read the original article Hit count: 170

Filed under:
|
|

Given a border layout with a west (navigation) and a center region. Let say I click on topic A in the west region, I want to replace (replace as in 'delete last topic') the center region with 'extjs' program code named topic_a.js

I succeed in loading with this code:

dynamicPanel = new Ext.Component({
    loader: {
        url: '/www/file.htm',
        renderer: 'html',
        autoLoad: true,
        scripts: true
    }
});

var oMainContainer = Ext.getCmp('maincontainer');
oMainContainer.show();
oMainContainer.add(dynamicPanel);

But calling this the second time 'adds' things up in the center region and of course fails short in 'deleting', what would be a good approach?

© Stack Overflow or respective owner

Related posts about dynamic

Related posts about extjs