Saluts!!!! I have my combo, IN SENCHA TOUCH, declared as the following
Ext.regModel('modelo', {fields: ['id', 'nombre']}); aaStore = new Ext.data.Store({ model: 'modelo', autoLoad: (noLoad !== true), autoDestroy : true, proxy: { type: 'ajax', url: url, extraParams: extraParams, reader: { type: 'array' } } }); bSelect = new Ext.form.Select({Ext.apply({ label: label, name: name, store: aaStore, placeHolder: config.placeHolder || 'Seleccione...', valueField: config.valueField || 'id', displayField: config.displayField || 'nombre', useClearIcon: config.useClearIcon || true }) })
I am almost new to Sencha touch, and I need to populate my combo "Ext.form.Select" from data coming from a variable, I mean, I found a plain of examples loading data from a proxy, dynamically, but that's not what I need. I need to load data to my combo from a variable that is hardcoded. I mean I've built the variable, an array type variable, like this:
var varArray = [['1','2'],['3','4'],['5','6']]
and I want to charge that data to my combo bSelect ,
I've tried the following:
this.bSelect.store.loadData(varArray,false);
but, although the data has been charged, I cannot be displayed, and when I select and element of that combo, it appears like "undefined"
Please, somebody help me out. How can I load data from an array variable into my sencha touch combo?