i have some problems setting the selected item of a radio button group by my viewmodel. Is it possible to set the selected value by the name of the element? I expected hat the viewmodel gender = true matches the second ('female') radio button.
Ext.application({
launch: function () {
var form = Ext.widget('form', {
renderTo: Ext.getBody(),
viewModel: {
data: {
gender: true
}
},
items: [{
xtype: 'radiogroup',
fieldLabel: 'Gender',
name: 'rbGender',
defaults: {
flex: 1
},
layout: 'hbox',
items: [{
boxLabel: 'Male',
name: 'gender',
inputValue: false,
id: 'radio1'
}, {
boxLabel: 'Female',
name: 'gender',
inputValue: true,
id: 'radio2'
}]
}]
});
}
});