Sorry but I do not understand the answer.
Server is returning 200, I need to let the user know the record was saved.
No callbacks seem to get fired.
Code:
*** EXTDIRECT
Ext.app.REMOTING_API = {
...
"VFave":[
{"name":"Create","len":2},
{"name":"Delete","len":1},
{"name":"extCrud","len":1}
],
...
*** MY MODEL
Ext.define('MBH.model.VFave', {
extend: 'Ext.data.Model',
IdProperty:'id',
fields:[
...
],
proxy: {
type: 'direct',
reader: {
type: 'json',
root: 'data'
},
api:{
create:function(rec,callback,directProxy){
Ext.app.VFave.Create(rec,callback,directProxy)
},
destroy:function(rec,callback,directProxy){
Ext.app.VFave.Delete(rec,callback,directProxy)
},
update:function(rec,callback,directProxy){
debugger
Ext.app.VFave.extCrud('delete', rec,callback,directProxy)
}
},
...
*** MY CONTROLLER
var vf = this.getFaveModel()
vf.set('video_id',111)
vf.set('user_id',222)
vf.save({
success: function(record, operation)
{
//record is the updated record, except for collections
//this collection will have the full records:
//operation.resultSet.records
//operation.resultSet.records[i] for each one if you are batching
debugger
},
failure: function(record, operation)
{
//handle failure(s) here
debugger
}
})
It saves and deletes fine.
But I dunno how to let the user know it happened.
You can see I have cobbled together from examples and don't quite get it yet.
How do I get a success or failure callback from a model save call using ExtDirect proxy ?