You will need to download html asynchronously and then inject it into your component. So:
Ext.Ajax.request({ url: 'changes.html', success: function(response){ // response.responseText will have your html content // you can then feed it into your component using update() } });
So, if you declare a component with id:
Ext.define('MeridianCRM.dialogs.recenthanges.recenthanges', { extend : 'Ext.window.Window', title : ' ', id: : 'my-log', ... });
Then you can:
Ext.Ajax.request({ url: 'changes.html', success: function(response){ Ext.getCmp('my-log').update( response.responseText ); } });
You can "integrate" it into your panel as follows:
Ext.define('MeridianCRM.dialogs.recenthanges.recenthanges', { extend : 'Ext.window.Window', title : ' ', id: : 'my-log', listeners: { 'render': function() { Ext.Ajax.request({ url: 'changes.html', success: function(response){ Ext.getCmp('my-log').update( response.responseText ); } }); } } ... });
Please note that you may have problems if the returned html contains the <head> (since the extjs page already has one).
source share