PDA

View Full Version : Combo box does not hold selection when keyboard navigation is used



khotsuhas
17 Mar 2011, 2:13 AM
Hi,

I have developed a form which has EXTJS combos in it.

The combo box works fine if I select value using mouse. But it does not hold selection if I select value using keyboard navigation.

The combobox selection get lost after selecting any value from the drop down list using keyboard navigation.

Following is the code i have used :



<script>
var myURL = '/loadComboValue.do';
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: myUrl
}),
reader: new Ext.data.JsonReader({
root: 'row',
totalProperty: 'totalCount',
id: 'id'},
[{name: 'id', mapping: 'id'},{name: 'excerpt', mapping: 'field'}]
)
});var combo = new Ext.form.ComboBox({
store: ds,
hiddenName:'hiddenFld',
mode: 'remote',
id='abc_combo',
displayField:'excerpt',
valueField: 'id',
typeAhead: 'false',
pageSize:15,
forceSelection: 'false',
queryParam : 'query',
triggerAction: 'all',
minChars : 3,
queryDelay:500,
lazyInit:true,
emptyText:'--select--',
listWidth:240,
tpl: getTpl(),
selectOnFocus:'true',
applyTo: 'ABC_DIV'});

</script>