PDA

View Full Version : store commit?



bkraut
9 Oct 2011, 11:49 PM
Hi,

how can I trigger store commit with REST functionality?



Ext.Msg.confirm(
'Delete record',
'Do you really want to delete selected record?',
function(btn, text){
if (btn == 'yes') {
var sm = this.getView().getSelectionModel();
this.store.remove(sm.getSelection());
this.store.sync(); // Here should be something that would do actual commit.???
if (this.store.getCount() > 0) {
sm.select(0);
}
}
},
this
);



And how do you reload the store with the fresh data?