日期:2014-05-16 浏览次数:20708 次
var fabircTypeDs = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: CONTEXT_PATH+'/fabrictype/fabrictypeAll.action' }), reader: selReader, remoteSort: false }); fabircTypeDs.load(); var fabircTypeCmb = new Ext.form.ComboBox({ fieldLabel: '布种', store: fabircTypeDs, hiddenName:'softId', loadingText: 'searching...', displayField : 'name', mode:'local', editable : false, valueField: 'id', width: 170, triggerAction: 'all' }); //供应商 当用户输入数据时根据输入信息进行模糊查询,动态生成列表,类似google搜索框 var dsSupplier = new Ext.data.Store({ proxy: new Ext.data.ScriptTagProxy({ url:CONTEXT_PATH+'/supplier/supplierAll.action' }), reader: new Ext.data.JsonReader({ root: 'gridRows', totalProperty: 'totalCount' }, [ {name: 'id', mapping: 'id'}, {name: 'name', mapping: 'name'} ]) }); var supplierCmb = new Ext.form.ComboBox({ fieldLabel:'供应商', store: dsSupplier, displayField:'name', valueField: 'id', typeAhead: true, loadingText: 'loading...', width: 170, hiddenName:'name', hideTrigger:true, minChars:1, forceSelection:true, triggerAction: 'all' });