1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    5
    Vote Rating
    0
    Ajay_S is on a distinguished road

      0  

    Default No direct function specified for this proxy

    No direct function specified for this proxy


    Hello,

    I'm using Ext.Direct to read lat/longs into a google map using sencha touch and .net mvc. The app runs great on my local machine and when I move it to the test server..the below message pops.

    [Ext.data.proxy.Server#read] No direct function specified for this proxy

    Any help would be greatly appreciated. I read that it takes time for the function to register and I did put the proxy in a constructor, but in vain.

    Thanks


  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What does your proxy look like? And does the direct function exist when the store is being loaded?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    5
    Vote Rating
    0
    Ajay_S is on a distinguished road

      0  

    Default


    Thanks for the reply. My proxy looks like the below :

    Code:
    Ext.define('MobileDirect.store.BridgeGeos', {
        extend: 'Ext.data.Store',
        config: {
            model: 'MobileDirect.model.BridgeGeo',
            proxy: {
                type: 'direct',
                directFn: Layer.getBridgeGeo,
                //autoLoad: true,
                //paramOrder: 'start|limit',
                reader: {
                    type: 'json',
                    rootProperty: 'data'
                }
            }
        }
    
    
    });
    Also, my app.js looks like this...

    Code:
    Ext.Loader.setConfig({
        enabled: true,
        paths: { 'MobileDirect': '/app' }
    });
    Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    
    
    Ext.application({
        name: 'MobileDirect',
        requires: [
            'MobileDirect.model.Layer',
            'MobileDirect.store.Layers',
            'MobileDirect.model.BridgeGeo',
            'MobileDirect.store.BridgeGeos'
        ],
        models: ['Layer','BridgeGeo','BridgeDetail'],
        stores: ['Layers', 'BridgeGeos', 'BridgeDetails'],
        views: ['Main','layerList'],
        controllers: ['Main'],
       
        launch: function () {
            Ext.Viewport.add({
                xclass: 'MobileDirect.view.Main'
            });
        }
    });
    Thanks for your help.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
    Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    Needs to be in the launch method of Ext.application as it needs to wait for that <script> to load.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    5
    Vote Rating
    0
    Ajay_S is on a distinguished road

      0  

    Default


    Thanks for prompt reply Mitchell. I tried your suggestion, but I receive the following errors

    [COLOR=red !important]Uncaught ReferenceError: Layer is not defined :55500/app/store/Layers.js?_dc=1352739060187:10[/COLOR]
    [COLOR=red !important]Uncaught ReferenceError: Layer is not defined :55500/app/store/BridgeGeos.js?_dc=1352739060188:7[/COLOR]
    [COLOR=red !important]Uncaught ReferenceError: Layer is not defined :55500/app/store/BridgeDetails.js?_dc=1352739060188:8[/COLOR]
    [COLOR=red !important]Uncaught Error: The following classes are not declared even if their files have been loaded: 'MobileDirect.store.Layers', 'MobileDirect.store.BridgeGeos', 'MobileDirect.store.BridgeDetails'. Please check the source code of their corresponding files for possible typos: '/app/store/Layers.js', '/app/store/BridgeGeos.js', '/app/store/BridgeDetails.js [/COLOR]

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Is Ext.app.REMOTING_API valid at that point when the store loads?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  7. #7
    Sencha User
    Join Date
    May 2012
    Posts
    5
    Vote Rating
    0
    Ajay_S is on a distinguished road

      0  

    Default


    It is valid I think because another store that loads a list of layers, loads perfectly...

    Code:
    Ext.define('MobileDirect.store.Layers', {
        extend: 'Ext.data.Store',
        config: {
            model: 'MobileDirect.model.Layer',
            proxy: {
                type: 'direct',
                directFn: Layer.List,
                reader: {
                    type: 'json',
                    rootProperty: 'data'
                }
            }
        }
    });

Thread Participants: 1

Tags for this Thread