我有一個JsonStore需要從超過30秒的HTTP請求中返回。如何覆蓋Ext JS JsonStore超時?
在JsonStore配置上設置「timeout」屬性不會覆蓋30秒超時,也不會設置代理(而不僅僅是設置url屬性)並在代理上設置超時。
如何擴展此超時?
(我用的Ext JS 3.1.1)
var ds = new Ext.data.JsonStore({
autoSave: true,
method: "POST",
/*url: "search-ajax.aspx",
timeout: 120000,*/
root: "rows",
totalProperty: "results",
idProperty: "primarykeyvalue",
proxy: new Ext.data.HttpProxy({ url: "search-ajax.aspx", timeout: 120000 }),
fields: previewColumnConfig,
baseParams: {
Command: "",
ID: primaryKeyValue,
Entity: entityFullName,
vetype: ValidationEntityType,
vepk: ValidationEntityPK,
now: (new Date()).getTime()
},
writer: new Ext.data.JsonWriter({
encode: true,
listful: false
})
});
對存在的存儲網格,你可以更新超時直接'grid.getStore()getProxy()超時= 60000'。 – 2017-08-18 12:39:36