Results 1 to 2 of 2

Thread: [FIXED][3.0 RC1] Ext.data.DirectProxy directFn

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default

    as of data/DirectStore.js
    line 46
    Code:
    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]); //
    Last edited by bas_denis; 18 Apr 2009 at 1:15 AM. Reason: Added Relation

  2. #2
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    381

    Default

    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.
    Code:
    var dproxy = new Ext.data.DirectProxy({
        directFn: Users.load
    })
    Or the full api config:
    Code:
    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.
    /**
    * @author Chris Scott
    * @business www.transistorsoft.com
    * @rate $150USD / hr; training $500USD / day / developer (5 dev min)
    *
    * @SenchaDevs http://senchadevs.com/developers/transistor-software
    * @twitter http://twitter.com/#!/christocracy
    * @github https://github.com/christocracy
    */

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •