itemselector用法,itemselector

來源:互聯網
上載者:User

itemselector用法,itemselector

var store = new Ext.data.Store({    // autoLoad:true,    // 擷取資料的方式    proxy : new Ext.data.HttpProxy({       url : 'connCfgManage.do?reqCode=getChannelCode'      }),    // 資料讀取器    reader : new Ext.data.JsonReader({       autoLoad : false,       totalProperty : 'TOTALCOUNT', // 記錄總數       root : 'ROOT' // Json中的列表資料根節點      }, [{         name : 'channelCode'        }])   }); var store2 = new Ext.data.Store({    autoLoad : false,    // 擷取資料的方式    proxy : new Ext.data.HttpProxy({       url : 'accountChannel.do?reqCode=getAccountChannelInfo'      }),    // 資料讀取器    reader : new Ext.data.JsonReader({       autoLoad : true,       totalProperty : 'TOTALCOUNT', // 記錄總數       root : 'ROOT' // Json中的列表資料根節點      }, [{         name : 'channelCode'        }])   }); var sm = new Ext.grid.CheckboxSelectionModel({    singleSelect : false   }); var isForm = new Ext.form.FormPanel({    title : '商戶帳號渠道配置選擇',    width : 700,    region : 'center',    buttonAlign : 'center',    bodyStyle : 'padding:10px;',// 定義樣式表    items : [{     xtype : 'itemselector',     name : 'itemselector',     id : 'myIt',     toLegend : "已選欄",     fromLegend : "可選欄",     drawUpIcon : false,     drawDownIcon : false,     drawLeftIcon : true,     drawRightIcon : true,     drawTopIcon : false,     drawBotIcon : false,     hideLabel : false,     imagePath : '../resource/extjs3.1/ux/images/',// 左右移動的圖片     multiselects : [{// 定義左邊資料      legend : '可選渠道',      width : 250,      height : 300,      store : store,      displayField : 'channelCode',      valueField : 'channelCode'     }, {      legend : '已有渠道',      width : 250,      height : 300,      displayField : 'channelCode',      valueField : 'channelCode',      store : store2,      tbar : [{       text : '清除所有',       iconCls : 'deleteIcon',       handler : function() {        isForm.getForm().findField('itemselector')          .reset();       }      }]     }]    }],    buttons : [{       text : '提交列表',       iconCls : 'acceptIcon',       handler : function() {        saveAccountBank();       }      }, {       text : '關閉',       iconCls : 'deleteIcon',       handler : function() {        cWindow.close();       }      }]   });store.load({    params : {     connType : threeForm.getForm().findField('connType')       .getValue()    },    callback : function() {     editChannelCode();    }   }); function editChannelCode() {  if ("defaultEdit" == temp || "customizedEdit" == temp) {   store2.load({      params : {       connType : threeForm.getForm()         .findField('connType').getValue(),       merId : merId,       merAccount : merAccount,       temp : temp      },      callback : function(records, options, success) {       for (i = 0; i < records.length; i++) {        var channelCode = records[i].get('channelCode');        var index = store.find("channelCode",          channelCode);        store.removeAt(index);       }      }     });  } else if ("customized" == temp || "default" == temp) {   store2.removeAll();  } }var channelCode = Ext.getCmp("myIt").getValue();擷取右邊的所有值

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.