javascript - Sencha Touch Store Add replaces record 1 -


i extended ext.data.store (i.e users model user) when iterate on custom json response , add each record, replaces first record , store consist of 1 record instead of many

here code (in image format) notice in line 215 added model on store on each iteration: enter image description here

and here console output w/c shows 1 on getcount(): enter image description here

i tried many solutions, , includes changing 'id' attribute else , differ user model users model

but have store adding fine without problems.

edit: tried adding through javascript console , still replaces record 1: enter image description here

the store's add function automatically handle creation of model(s). callback should simple this:

callback: function(optionsusers, successusers, responseusers) {     loadingloginmodal.hide();      var responseusersjson = ext.json.decode(responseusers.responsetext);     userstore.add(responseusersjson);      loadingloginmodal.destroy();     that.showhomeview(); } 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -