Feb 25, 2011, 8:34 PM
Problems with linked combobox/superboxselect
Hello,
I am having a problem with trying to link a combox select event to the reload of the remote data store in a SuperBoxSelect object. When I make a selection in the combobox, the complete list of store entries does not get updated.
They are defined as follows:
Any insight would be appreciated,
Bill
I am having a problem with trying to link a combox select event to the reload of the remote data store in a SuperBoxSelect object. When I make a selection in the combobox, the complete list of store entries does not get updated.
They are defined as follows:
var ChonClassMultiSelect = new Ext.form.ComboBox({
allowBlank:false,
id:'chonClassMulti',
xtype:'combo',
fieldLabel: 'Chondrite Class',
emptyText: 'Chondrite Class',
resizable: true,
minChars: 2,
store:new Ext.data.JsonStore({
url:'/getChonClass/',
autoLoad:true,
baseParams:{cmd:'getChonClass'},
root:'chonclass_records',
fields:['chon_class','class_name']
}),
mode: 'remote',
displayField: 'class_name',
displayFieldTpl: '{class_name}',
valueField: 'chon_class',
selectOnFocus: true,
width:170,
listeners: {
'select':{ fn:function(combo,value) {
//Ext.Msg.alert('Chon Class select event fired!');
chonGroupCbx=Ext.getCmp('chonGroupMulti');
chonGroupCbx.clearValue();
chonGroupCbx.store.filter('chon_class', combo.getValue());
//chonGroupCbx.store.load({params:{'chon_class':this.value}}); //can use multiple params if you want to change filter field
chonGroupCbx.setVisible(true);
}
}
},
hidden:true,
disabled:true,
hideLabel:true,
listWidth: 'auto',
queryDelay: 0,
triggerAction: 'all'
});
var ChonGroupMultiSelect = new Ext.ux.form.SuperBoxSelect({
allowBlank:false,
id:'chonGroupMulti',
xtype:'superboxselect',
fieldLabel: 'Chondrite Group',
store: new Ext.data.JsonStore({
url:'/getChonGroups/',
autoLoad:true,
baseParams:{cmd:'getChonGroups'},
root:'chongroup_records',
fields:['chon_group','groupname']
}),
emptyText: 'Chondrite Group',
resizable: true,
minChars: 2,
mode: 'remote',
displayField: 'groupname',
displayFieldTpl: '{groupname}',
valueField: 'chon_group',
hidden:true,
hideLabel:true,
listWidth: 'auto',
queryDelay: 0,
lastQuery:'',
triggerAction: 'all'
});
The filter 'chon_class' used in the server side function that returns JSON is clearly referenced as request.POST['chon_class'] , and works well when I make the function request using GET parameters instead.Any insight would be appreciated,
Bill
Last edited by geoffrey.mcgill; Feb 26, 2011 at 12:33 AM.
Reason: please use [CODE] tags