首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

ExtJs combobox模模糊糊匹配

2012-06-29 
ExtJs combobox模糊匹配{xtype : combobox,fieldLabel : 选择银行,name : bankDTO.id,allowBlank :

ExtJs combobox模糊匹配

{xtype : 'combobox',fieldLabel : '选择银行',name : 'bankDTO.id',allowBlank : false,queryMode : 'remote',displayField : 'name',valueField : 'id',store : Ext.create('Ext.data.Store', {fields: ['id', 'name'],proxy : {type : 'ajax',url : getRequestPath('bank_listBank.action'),reader : {type : 'json',root : 'bankList'}},autoLoad : true}),listeners : {beforequery : function(e) {var combo = e.combo;   if(!e.forceAll){   var value = e.query;   combo.store.filterBy(function(record,id){   var text = record.get(combo.displayField);   return (text.indexOf(value)!=-1);   });combo.expand();   return false;   }}}}

热点排行
Bad Request.