Sencha touch list is not refreshing -


i using 'list' child component on view. not using store data, instead i'm using simple 'data' property of list layout list items.

my requirement update same list taping button on same view. updating data setdata method of list, new items appended list instead of replacing old ones. list is not behaving well. event listeners (itemtap) old data records seems intact.

this view contains list http://jsfiddle.net/xer1es0w/ here controller using view http://jsfiddle.net/6gwwes0p/

note: have truncated lines of code reason of code security

enter image description here

in example not doing think doing.

here code of happends once setdata(bla).

function(data) {     var store = this.getstore();     if (!store) {         this.setstore(ext.create('ext.data.store', {             data: data,             autodestroy: true         }));     } else {         store.add(data);     } } 

sencha looks if there store data. if not creates one.

on first run adds store , adds data store.

==> on second run need call

list.getstore().removeall(); list.adddata(bla); 

or try

list.getstore().setdata(bla); 

Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -