View Full Version : [FIXED][3.0 RC1] Ext.data.DirectProxy directFn

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
[CODE]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]); //

21 Apr 2009, 10:38 PM
added back the directFn configuration-param on DirectProxy.

DirectProxy (all proxies actually) can be configured with a full CRUD api or just a single directFn for when only executing the load action.

var dproxy = new Ext.data.DirectProxy({
directFn: Users.load

Or the full api config:

var dproxy = new Ext.data.DirectProxy({({
api: {
load: Users.load,
create: Users.create,
save: Users.update,
destroy: Users.destroy

If you define both an api and a directFn, the api-config will supercede the directFn.