1. #1
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    597
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Post Ext.data.DirectProxy - where is the connection object?

    Ext.data.DirectProxy - where is the connection object?


    Can someone please tell me where a connection object gets instantiated when I configure Ext.data.Store to use with Ext.data.DirectProxy?

    Here's my store config:

    Code:
    var store = new Ext.data.Store({
        proxy : new Ext.data.DirectProxy({
            api : {
                read  : '/someurl',
                create: '/someurl',
                delete : '/someurl',
                update : '/someurl'
            }
        })
    })
    When I call "store.load()", it tries to to call "this.proxy.request(...)" but triggers an error, due to

    Code:
    var directFn = this.api[action] || this.directFn;
    ...
    directFn.apply(window, args);
    in DirectProxy.js' doRequest method - directFn holds an object with the api urls but thats about it, there is no connection object.


    What am I missing/doing wrong here?

  2. #2
    Ext JS Premium Member dj's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    573
    Vote Rating
    2
    dj has a spectacular aura about dj has a spectacular aura about dj has a spectacular aura about

      0  

    Default


    The js-doc for Ext.data.DirectProxy#api seams to be missing. DirectProxys use functions created by an Ext.direct.RemotingProvider - not urls.

    So either use an Ext.data.HttpProxy:
    Code:
    var store = new Ext.data.Store({
        proxy : new Ext.data.HttpProxy({
            api : {
                read  : '/someurl',
                create: '/someurl',
                delete : '/someurl',
                update : '/someurl'
            }
        })
    })
    or use Direct functions for the CRUD operations:
    Code:
    Ext.Direct.addProvider({
      type:'remoting',
      url:'/router',
      namespace:'App.direct',
      actions:[{...}]
    });
    
    ...
    
    var store = new Ext.data.Store({
        proxy : new Ext.data.DirectProxy({
            api : {
                read  : App.direct.some.function,
                create: App.direct.some.function,
                delete : App.direct.some.function,
                update : App.direct.some.function
            }
        })
    })
    Daniel Jagszent
    dɐɳiel@ʝɐgszeɳt.de <- convert to plain ASCII to get my email address

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi