最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

基于ExtJs在頁(yè)面上window再調(diào)用Window的事件處理方法

 更新時(shí)間:2017年07月26日 09:34:12   投稿:jingxian  
下面小編就為大家?guī)?lái)一篇基于ExtJs在頁(yè)面上window再調(diào)用Window的事件處理方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧

今天在開(kāi)發(fā)Ext的過(guò)程中遇到了一個(gè)惡心的問(wèn)題,就是在ext.window頁(yè)面,點(diǎn)擊再次彈出window時(shí),gridpanel中的store數(shù)據(jù)加載異常,不能正常被加載,會(huì)出現(xiàn)緩存,出現(xiàn)該問(wèn)題,是因?yàn)閣indow窗口彈出時(shí),兩個(gè)window同時(shí)存在,并且在兩個(gè)window交替使用時(shí),需要先將一個(gè)窗口關(guān)閉,關(guān)閉時(shí),會(huì)對(duì)window的緩存進(jìn)行清理,這樣就能保證store數(shù)據(jù)的正確加載。分享給大家,供參考。

var actInfoWindow2;
function showCallFlowInfoWindow(flowid, actId) {
  var actWindowHeight1 = window.innerHeight
  || document.documentElement.clientHeight
  || document.body.clientHeight;
  if(null != upldWin && undefined != upldWin && "" != upldWin){
    upldWin.close();
  }
  // 異?;顒?dòng)模型
  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',
    proxy : {
      type : 'ajax',
      url : 'subflow.do',
      reader : {
        type : 'json',
        root : 'callFlowList',
        totalProperty : 'total'
      }
    }, 
    listeners: { 
      'beforeload': function (store, op, options) {
        var params = { 
          //參數(shù) 
          flowId : flowid,
          id : actId
        }; 
        Ext.apply(store.proxy.extraParams, params); 
      } 
    } 
  });
   
  // 綁定數(shù)據(jù)模型flowColumns
  var callFlowColumns = [
    { text: '實(shí)例名', dataIndex: 'instance', width:174 },
    { text: '工程名', dataIndex: 'prjName',width: 174 },
    { text: '工作流名', dataIndex: 'flowName',width: 174 },
    { text: '啟動(dòng)時(shí)間', dataIndex: '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 : " 數(shù)據(jù)加載中,請(qǐng)稍等 "
    }
  });
   
  if (actInfoWindow2 == undefined || !actInfoWindow2.isVisible()) {
    actInfoWindow2 = Ext.create('Ext.window.Window', {
      id : 'actInfoWindow2',
      title : '活動(dòng)信息詳情',
      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();
}

我的問(wèn)題出現(xiàn)就是因?yàn)闆](méi)有添加上面黃色背景的代碼片段導(dǎo)致的錯(cuò)誤。供大家參考。兩個(gè)window交替使用時(shí),需要交替關(guān)閉,這樣才能保證頁(yè)面的正常。ExtJs不建議彈出多window同時(shí)使用,當(dāng)然,如果能解決好ExtJs之間的數(shù)據(jù)交互,也未必不可以。

以上這篇基于ExtJs在頁(yè)面上window再調(diào)用Window的事件處理方法就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

您可能感興趣的文章:

相關(guān)文章

最新評(píng)論

长岛县| 南靖县| 黑水县| 兴业县| 甘孜县| 泽州县| 湘乡市| 台安县| 英山县| 天水市| 青州市| 屯昌县| 清徐县| 宜都市| 巴青县| 报价| 连江县| 承德县| 舟山市| 屏山县| 龙胜| 绥中县| 锡林郭勒盟| 余姚市| 南岸区| 禄丰县| 宜州市| 昭觉县| 泌阳县| 梅河口市| 泗阳县| 房产| 新宾| 威信县| 彝良县| 夏津县| 上高县| 巨野县| 新乐市| 广南县| 江山市|