lundi 12 mai 2014

Complete records, but incomplete store

hello,

Callback function in a store, correctly returns the total record in the record, but no store appears only 1 record.


Ext.define('MyApp.controller.Filtro', {

extend: 'Ext.app.Controller',

config: {

refs: {

filtroView: 'FiltroView',,

lsSimulado: '#lsSimulado',

//sSimuladoLista:'SimuladoLista'

},

control: {

lsSimulado:{

itemtap: 'onGetSimuladoLista'

}

},

},


onGetSimuladoLista: function(dataView,index,item,e){

var sSimuladoLista = Ext.create('MyApp.store.SimuladoLista');

MyApp.config.Runtime.setIdSimulado(e.internalId);

sSimuladoLista.load({

params: {cod_simulado: MyApp.config.Runtime.getIdSimulado()},

scope: this,

callback : function(records, operation, success) {

console.log(records); //Returns the correct amount coming from the backend (php)

console.log(sSimuladoLista); //Always returns one.

}

});

}

},





Aucun commentaire:

Enregistrer un commentaire