PDA

View Full Version : help in simple handler



arvindwill
31 Jul 2009, 11:01 AM
fieldLabel: 'Action',
id:'action_grp',
xtype: 'radiogroup',
itemCls: 'x-radio-group-alt',
columns: 2,
width:200,
allowBlank: false,
items: [
{boxLabel: 'Lock', name: 'action',
handler:function(){
Ext.getCmp('submit').setText('Lock')
}
},
{boxLabel: 'Unlock', name: 'action',
handler:function(){
Ext.getCmp('submit').setText('Unlock')
}
}
]



in this code radio buttons had handler to settext for a button, but it works weird.. when i first click 'Lock' its working well, after when i click unlock also its working well. But the problem starts now, once i clicked unlock handler is working weird as it always fire the unlock(2nd) handler alone.. i tried in many forms but getting same problem only. is 2nd handler is overriding 1st one? help me from it.

mjlecomte
1 Aug 2009, 4:46 AM
Suggest you post your code properly:
http://extjs.com/learn/Ext_Forum_Help#How_to_post_code_properly

Even better if you make a working showcase:
http://extjs.com/learn/Ext_Forum_Help#Posting_a_working_showcase