Today, in the process of developing EXT, I encountered a disgusting problem, is in the Ext.window page, click on the popup window again, Gridpanel in the store data load exception, can not be loaded, the cache will appear, this problem occurs because the Windows window pops up, two windows simultaneously, and in the two window alternate use, you need to first When a window is closed, the cache of the window is cleaned to ensure proper loading of the store data. Share to everyone for reference.
var actinfowindow2;function showcallflowinfowindow (Flowid, Actid) {var actWindowHeight1 = window.innerheight| | document.documentelement.clientheight| | Document.body.clientHeight;if (null! = Upldwin && undefined! = Upldwin && ""! = Upldwin) {upldwin.close ();}Abnormal activity Model Ext.define (' Callflowmodel ', {extend: ' Ext.data.Model ', fields: [{name: ' instance ', type: ' String '}, {name: ' Flowname ', type: ' String '}, {name: ' Prjname ', type: ' String '}, {name: ' StartTime ', type: ' String '}]}); callflowstore = ext.create (' Ext.data.Store ', {autoload:true,model: ' Callflowmodel ', p Roxy: {type: ' ajax ', url: ' subflow.do ', reader: {type: ' json ', Root: ' Callflowlist ', Totalproperty: ' Total '}, Li Steners: {' beforeload ': function (Store, OP, Options) {var params = {//Parameter Flowid:flowid, Id:actid}; Ext.apply (store.proxy.extraParams, params); }});//Bind data Model Flowcolumnsvar Callflowcolumns = [{text: ' Instance name ', Dataindex: ' instance ', width:174}, {text: ' Project name ', Dataindex: ' Prjname ', width:174}, {text: ' Workflow name ', Dataindex: ' Flowname ', width:174}, {text: ' Start time ', Da Taindex: ' StarttiMe ', width:174}];callflowgrid = Ext.create (' Ext.grid.Panel ', {region: ' Center ',//tbar:querybar,id: ' Callflowlist ', Autoscroll:false,border:false,//columnlines:true,//selmodel:selmodel,//bbar:pagebar,columns:callflowcolumns, Store:callflowstore,loadmask: {msg: "Data loading, please Wait"}}); if (ActInfoWindow2 = = Undefined | |! Actinfowindow2.isvisible ()) {actInfoWindow2 = ext.create (' Ext.window.Window ', {id: ' ActInfoWindow2 ', Title: ' Event information details ', Modal:true,closeaction: ' Destroy ', Constrain:true,autoscroll:true,width:700,height:actwindowheight1-300,items : [Callflowgrid],listeners:{beforeclose:function () {Actinfowindow2.destroy (); }}});} Actinfowindow2.show ();}
if
(
null
!= upldWin && undefined != upldWin &&
""
!= upldWin){
upldWin.close();
}
My problem arises because there are no errors caused by the code snippet with the yellow background above. For everyone's reference. When the two window is used alternately, it needs to be switched off to ensure that the page is normal. ExtJS is not recommended to pop up multiple windows at the same time, of course, if you can solve the extjs between the data interaction, it may not be.
ExtJS Event handling for window on page