-
9 Nov 2012 8:27 AM #1
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
-
12 Nov 2012 8:03 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
12 Nov 2012 8:18 AM #3
Thanks for the reply. My proxy looks like the below :
Also, my app.js looks like this...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' } } } });
Thanks for your help.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' }); } });
-
12 Nov 2012 8:26 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Needs to be in the launch method of Ext.application as it needs to wait for that <script> to load.Code:Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
12 Nov 2012 8:54 AM #5
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]
-
12 Nov 2012 10:37 AM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Is Ext.app.REMOTING_API valid at that point when the store loads?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
12 Nov 2012 12:00 PM #7
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' } } } });


Reply With Quote