PDA

View Full Version : How to refreshNode in View?



tiplip
26 Mar 2014, 10:46 PM
With Ext 4.2.1, I have an instance of Ext.view.View, and I add data to this view object, sometimes I will update the last inserted data, correspondingly, I want view updated after its data changed, I do the following but failed.


var last = this.store.last();
last.data.content.push(a.content); // a.content is array containing a group of strings
last.commit();

this.refreshNode(this.store.indexOf(last));



After execution, the view is not updated, but this.refresh() works well, I just want to be sufficiently, what's wrong with refreshNode here?

Gary Schlosberg
1 Apr 2014, 8:38 PM
Are you sure that you are providing refreshNode with the correct index?

tiplip
3 Apr 2014, 4:33 AM
do you mean
this.store.indexOf(last) does not work?