PDA

View Full Version : Combobox onblur not working



saravanant
17 Sep 2009, 10:46 PM
Hi

I have userDefined combobox. if i hit the tab button blur event is not working. If i hit tab button second time then blur event is called. on blur event i am tring to collopse the dropdown. If i press tab button double time then only dropdown is collopsing. I want on single press of tab button dropdown to collopse

can you please help me to resolve this issue?



Ext.ux.NLComboBox = Ext.extend(Ext.form.ComboBox,{
// Defaults of the existing Attributes
listAlign:'l',
forceSelection:true,
typeAhead:true,
mode:'local',
triggerAction:'all',
emptyText:'Please Select',
selectOnFocus:true,
baseCls:'nlComboBox',
loadingText:'Loading ...',
valueField:'intId',
displayField:'name',
editable:true,
// New Attributes
ajaxAction:null,
ajaxJSON:null,
flagLabel:null,
flagObject:null,

constructor:function(config){
Ext.ux.NLComboBox.superclass.constructor.apply(this, arguments);
},
initComponent:function(){
Ext.apply(this,{});
Ext.ux.NLComboBox.superclass.initComponent.apply(this, arguments);

this.on('change',function(){
//Flag Updation
if(this.flagLabel !=null&&this.flagLabel.length >0){
this.flagObject.setFlag(this.flagLabel,true);
}
//this.flagObject.alertAllFlags();
});

this.on('focus',function(){
//Ajax call
if(this.ajaxAction !=null&&this.ajaxAction.length >0){
makeAjaxCallToFillStore(this.ajaxAction,this.ajaxJSON,this.store);
}
});
},

onRender:function(){
Ext.ux.NLComboBox.superclass.onRender.apply(this, arguments);
}
});

//register xtype
Ext.reg('NLComboBox', Ext.ux.NLComboBox);




var cboBarCodeID =new Ext.ux.NLComboBox({
id:'cboBarCodeID',
ajaxAction:'fetchTicketTypes',
ajaxJSON:null,
minListWidth :310,
store: barCodeIdStore,
tabIndex :14,
flagLabel: flgObj.styleFlagLabel,
flagObject: flgObj
});





Ext.getCmp('cboBarCodeID').on('blur', collopseBarCodeID)

function collopseBarCodeID(){
Ext.getCmp('cboBarCodeID').collapse();
}

saravanant
20 Sep 2009, 8:14 PM
Any suggestion to resolve this issue?

saravanant
20 Sep 2009, 9:27 PM
The issue due to typeahead is not working. If the typeahead works then single tab press focus moving to the next component. But i am not sure why typeahead is working sometime and sometime it's not working.

Can you help me to resolve this.

saravanant
20 Sep 2009, 10:18 PM
Hi

If you need any additional information please let me know??????????

yadazula
11 Mar 2010, 6:15 AM
I experience the same problem with combobox. If i press the tab button, blur event does not fire. Anyone has a solution for this ?