I am using Extjs 4 and I have a Ext.window.Window
which has a loader property:
this.HistoryWin = new Ext.window.Window({
title: '',
modal: true,
autoScroll: true,
width: 700,
height: 400,
closeAction: "hide",
loader: {
url: "Requests/history.php",
scripts: true
},
buttons: [{
text: "",
iconCls: "undo",
handler: function () {
this.up('window').hide();
}
}]
});
In this window, the target page does get loaded correctly. Now I want to load this page, as an item inside a window. I mean I want that my window to have multiple items and one of them be this loader. How should I do that?
This one have solved and the answer is to add some panels with loaders inside window. For example:
this.HistoryWin = new Ext.window.Window({
title: '',
modal: true,
autoScroll: true,
width: 700,
height: 400,
closeAction: "hide",
items: [
{
xtype: 'panel',
itemId: 'OwnPanel',
autoScroll: true,
width: 688,
height: 300,
loader: {
url: "Requests/RequestDetails.php",
method: "post",
scripts: true
},
},
{
xtype: 'panel',
itemId: 'HistoryPanel',
autoScroll: true,
width: 688,
height: 300,
loader: {
url: "Requests/history.php?fromRestateWin=1",
scripts: true,
// autoLoad: true,
},
}
],
buttons: [{
text: "",
iconCls: "undo",
handler: function () {
this.up('window').hide();
}
}]
});
and one important note. Make each loader to autoLoad or do not forget to load it manually.