Hi all,
I don't manage to load a component config dynamically with the renderer of type 'component'.
Here is the code :
Code:
var wizard_page_01 = Ext.create('Ext.form.Panel', {
title: 'Dynamic form panel',
height: 200,
items: [
{
xtype: 'container',
id: 'cp1',
html: 'Click on the load button to load content',
loader:{
loadMask: true,
removeAll: true,
url:"../(AJAXGETCMP)?openagent",
renderer: 'component',
success: function()
{
alert('content loaded');
}
}
}
],
tbar: [
{
text: 'LOAD',
handler: function() {
var dynamic = wizard_page_01.child('#cp1');
dynamic.getLoader().load();
}
}
]
});
If I remove the 'component' renderer option, then it loads correctly my server response content, but as html format, of course.
My server response is this :
Code:
{"success": true, "data": {id: 'newCmp', xtype: 'container', border: 1, height: 250, html: 'Content loaded successfully'}}
The Ext documentation is not clear about how the server response should be when it comes to 'component' renderer.