RadioGroup fires 'change' twice
http://stackoverflow.com/questions/9229471/extjs-4-radiogroup-change-event-fires-twice
HTML
<link rel="stylesheet" href="http://dev.sencha.com/deploy/ext-4.0.7-gpl/resources/css/ext-all.css">
JavaScript
var gr = Ext.create('Ext.form.RadioGroup', {
id: 'WheatChoice',
padding: '',
layout: {
type: 'hbox'
},
fieldLabel: 'Choose Model',
allowBlank: false,
columns: 1,
flex: 1,
items: [
{
xtype: 'radiofield',
id: 'SpringWheat',
fieldLabel: '',
boxLabel: 'Spring',
name: 'wheat-selection',
inputValue: '0',
flex: 1},
{
xtype: 'radiofield',
id: 'WinterWheat',
fieldLabel: '',
boxLabel: 'Winter',
name: 'wheat-selection',
inputValue: '1',
checked: true,
flex: 1}
]
});
gr.on('change', function() {
Ext.getBody().insertHtml('afterEnd', '<div>changed ' + (new Date()).getTime() + '</div>');
});
gr.render(Ext.getBody());