带有加载程序的 Extjs 4 项目
Extjs 4 item with loader
我正在使用 Extjs 4,我有一个 Ext.window.Window
,它有一个加载程序 属性:
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();
}
}]
});
在此 window 中,目标页面确实已正确加载。现在我想加载这个页面,作为 window 中的一个项目。我的意思是我希望我的 window 有多个项目,其中之一就是这个加载程序。我应该怎么做?
这个已经解决了,答案是在 window 中添加一些带有加载器的面板。例如:
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();
}
}]
});
还有一个重要说明。让每个加载器自动加载或者不要忘记手动加载它。
我正在使用 Extjs 4,我有一个 Ext.window.Window
,它有一个加载程序 属性:
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();
}
}]
});
在此 window 中,目标页面确实已正确加载。现在我想加载这个页面,作为 window 中的一个项目。我的意思是我希望我的 window 有多个项目,其中之一就是这个加载程序。我应该怎么做?
这个已经解决了,答案是在 window 中添加一些带有加载器的面板。例如:
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();
}
}]
});
还有一个重要说明。让每个加载器自动加载或者不要忘记手动加载它。