2012-05-11 89 views
0

我有一个列表中的组合框的一组值的搜索筛选器,ExtJS的:在组合框中

Ext.define('loincList', { 
      extend: 'Ext.data.Model', 
      fields: [{ name: 'loincNumber', mapping: 'loincNumber' }, 
        { name: 'component', mapping: 'component' }    
      ] 
     });  

ds = Ext.create('Ext.data.Store', { 
      model: 'loincList', 
      proxy: { 
       type: 'ajax', 
       url : url+'/lochweb/loch/LOINCData/getLOINCData', 
       reader: { 
        type: 'json', 
        root: 'LOINCData' 
       } 
      } 
     }); 

组合框:

{ 
     xtype: 'combo', 
     fieldLabel: 'Search Loinc Code', 
     name: "loincId",  
     displayField: 'loincNumber',      
     valueField: 'id', 
     width: 400,     
     store: ds, 
     queryMode: 'local', 
     allowBlank:false, 
     listConfig: { 
      getInnerTpl: function() { 
       return '<div data-qtip="{loincNumber}.{component}">{loincNumber} {component} {status}</div>'; 
      } 
     } 

    } 

当我键入在组合框中键入一个数字它根据输入的数字筛选,但是当我输入文本时,它不是基于输入的文本进行筛选。 如何根据输入的文字进行过滤。

回答

0

当您键入的数据组合框,将过滤器的基础上displayField。因此,我认为,当你“键入不输入它基于文本过滤文本”,因为在组合中没有商品有displayField与像你键入的文本前缀。

0

过滤工作在服务器端,如果你对类似Firebug的切换,你会看到特殊的参数(通常称为过滤器)与您在控制键入的文本,所以你需要检查你的服务器端发生什么事。您需要处理滤镜文本并在服务器端根据需要制作滤镜。

+0

不,它不是服务器端filtering.It是ExtJS的组合框,提供过滤facilitiy我希望。 – user1321824