bas_denis
16 Apr 2009, 6:16 PM
as of data/DirectStore.js
line 46
proxy: (typeof(c.proxy) == 'undefined') ? new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')) : c.proxy,
the default proxy should get a directFn property via the stores initial config
DirectProxy doesn't care about any directFn property
doRequest : function(action, rs, params, reader, writer, cb, scope, options) {
var args = [];
var directFn = this.api[action];
switch (action) {
case 'save':
args.push(params[reader.meta.idProperty]); // <-- save(Integer/Integer[], Hash/Hash[])
args.push(params[writer.dataProperty]);
break;
case 'destroy':
args.push(params[writer.dataProperty]); // <-- destroy(Int/Int[])
break;
case 'create':
args.push(params[writer.dataProperty]); // <-- create(Hash)
break;
case 'load':
args.push(params); // <-- load(Hash)
break;
}
args.push(this.createCallback(action, reader, cb, scope, options));
directFn.apply(window, args);
},
kind regards
relation added: Child of [3.0 RC1] Ext.data.DirectProxy incomplete ? (http://extjs.com/forum/showthread.php?t=65919)
line 46
proxy: (typeof(c.proxy) == 'undefined') ? new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')) : c.proxy,
the default proxy should get a directFn property via the stores initial config
DirectProxy doesn't care about any directFn property
doRequest : function(action, rs, params, reader, writer, cb, scope, options) {
var args = [];
var directFn = this.api[action];
switch (action) {
case 'save':
args.push(params[reader.meta.idProperty]); // <-- save(Integer/Integer[], Hash/Hash[])
args.push(params[writer.dataProperty]);
break;
case 'destroy':
args.push(params[writer.dataProperty]); // <-- destroy(Int/Int[])
break;
case 'create':
args.push(params[writer.dataProperty]); // <-- create(Hash)
break;
case 'load':
args.push(params); // <-- load(Hash)
break;
}
args.push(this.createCallback(action, reader, cb, scope, options));
directFn.apply(window, args);
},
kind regards
relation added: Child of [3.0 RC1] Ext.data.DirectProxy incomplete ? (http://extjs.com/forum/showthread.php?t=65919)