PDA

View Full Version : Remote Combo With Local Filter



jnjc
24 Oct 2011, 4:31 PM
Hi,

I have a number of comboboxes that get their content using a remote store. At the moment when the user starts typing in these comboboxes it reloads the store passing the type text. What I would like to happen is for the data to be filtered locally so that there is only one initial ajax call to fill the combo and from there the data is filtered as if the combo was local ? Does anybody know if this is possible ?

Below are some code segments.

Thanks,
JC



The data stores are defined as follows:


var ClientIdComboStore = new Ext.data.JsonStore({
root: 'dataRoot',
autoDestroy:true,
idProperty: 'ClientId',
totalProperty: 'totalCount',
fields:[{name:'sysRowid'},{name: 'ClientId'},{name:'_displayName'},{name:'AgencyId'},{name:'DeptId'},{name:'ReferrerId'}],
proxy: new Ext.data.HttpProxy({
url: 'index.php?&Mode=Feed&requestType=ajax&action=combo.ClientId&contextId='
})
});

The comboboxes are defined as follows:


{xtype:'combo',id:'ClientId',fieldLabel: 'Client',
allowBlank:false,width: 200,displayField:'_displayName',
valueField: 'ClientId',
mode:'remote',
typeAhead:true,triggerAction:'all',lazyRender:true,hiddenName:'ClientId',
store:ClientIdComboStore,name:'ClientId'}