// Extjs combox store动态传递参数var categoryRecord=[ {name : 'cid',type : 'string'}, {name : 'cname',type : 'string'}]; var url = '/customize/control/retrieveCategoryNew?serviceStandard=';var categoryRecordHeads = Ext.data.Record.create(categoryRecord); // 定义一个Connection,以便下面JS修改URL添加参数var categoryConn = new Ext.data.Connection({timeout:0,url:url});var categoryDatastore = new Ext.data.Store( { proxy:new Ext.data.HttpProxy(categoryConn), reader : new Ext.data.JsonReader( { root : 'categoryType' }, categoryRecordHeads), remoteSort : false});categoryDatastore.load();categoryDatastore.on('beforeload',function(){ url = '/customize/control/retrieveCategoryNew?serviceStandard='; // 页面的一个参数 var serviceStandard = $("#Meta_guestType").val(); if("2" == serviceStandard){ serviceStandard = "1"; }else if("8" == serviceStandard){ serviceStandard = "2"; }else{ serviceStandard = ""; } url += serviceStandard; // store加载前修改URL categoryConn.url = url; });var categoryCombo = new Ext.form.ComboBox({ id:'categoryCombo', width:140, forceSelection : true, selectOnFocus: true, triggerAction: 'all', mode: 'local', store: categoryDatastore, allowBlank: true, valueField : 'cid', displayField : 'cname', value:'---请选择---'});