I have a form with combos in it, and I am trying to figure out an easy way of passing the combo values through to the combo widget.
Basically I am passing through an array to my form like so :
var contentPanel = Ext.create('MyForm', {
countryCodesForCombo: _this.countryCodesForCombo,
});
This means the data comes through the initComponent method.
Ext.define('MyForm', {
extend: 'Ext.form.Panel',
initComponent : function (){
var cCodes = this.countryCodesForCombo;
this.callParent();
},
items: [
{
fieldLabel: 'Hi',
xtype: 'combobox',
name: 'land',
displayField:'name',
store: {
fields: ['name'],
data: this.countryCodesForCombo // <--- want to get country codes somehow here
}
}
]
});
However the values can't get to the item objects.
Basically my question is, how do I get values passed through the initComponent method into the items array?