-
7 Nov 2012 10:53 AM #21
Hello. Yes, component working with 2.1.
What is wrong?
-
7 Nov 2012 3:24 PM #22
Thanks for your quick reply. I guess I must be doing something wrong
I get two javascript errors :- Uncaught TypeError: Cannot read property 'getInfos' of undefined : Ext.app.AUDirectory_Info.getInfos is called in my proxy, AU/DirectoryBundle being my bundle namespace and infoController the controller where you will find getInfosAction
- Afterwards : You're trying to decode an invalid JSON String : my browser actually receives an HTML file
an extract of config.yml :Code:public function getInfosAction() { $query = $this->getDoctrine() ->getEntityManager() ->getRepository('AUDirectoryBundle:Info') ->findInfos(); return $this->get('ext_direct') ->createResponse(new AbstractQuery(), $query); }
an extract of info.jsCode:ext_direct: router: rules: getInfos: defaults: { _controller: AUDirectoryBundle:Info:getInfos, params: true } reader: { root: root }
an extract of app.js (the function in init does not get the chance to be executed) :Code:proxy: { type: 'direct', api: { read: Ext.app.AUDirectory_Info.getInfos, }, reader: { type: 'json', root: 'root' } }
Any help is very appreciatedCode:Ext.application({ ... init: function() { console.log('init app'); Ext.direct.Manager.addProvider(Ext.app.REMOTING_API); }, ... });
-
8 Nov 2012 2:29 AM #23
Please, show me your /api.js
-
8 Nov 2012 3:17 AM #24
Try this:
Code:proxy: { type: 'direct', api: { read: Actions.AUDirectory_Info.getInfos, }, reader: { type: 'json', root: 'root' } }
-
8 Nov 2012 1:16 PM #25
Below api.js without performing the modification you suggested :
I get exactly the same error messages and api.js file when I replace Ext.app with Actions as you suggested. And when I apply the change in the definition of the provider in app.js that does not make any difference.Code:Ext.ns("Actions"); Actions.REMOTING_API = {"type":"remoting","namespace":"Actions","url":"\/automation\/web\/app_dev.php\/route","actions":{"AUDirectory_Info":[{"name":"getInfos","len":1}]}};
-
8 Nov 2012 1:44 PM #26
First. If you have namespace "Actions" in api.js, you need use this namespace and for calling remote procedures.
This is working for me, example from real project.
Template:
App.js:Code:<script type="text/javascript" src="http://localhost/api.js"></script>
Try use without change namespace in any places.Code:Ext.require([ ... 'Ext.direct.*', ... ], function() { Ext.direct.Manager.addProvider(Actions.REMOTING_API); });
-
9 Nov 2012 1:42 PM #27
Thanks a lot for your help GH1UA that actually works ! I guess the provider must be defined ASAP
-
12 Mar 2013 5:45 AM #28
No funciona el Link
No funciona el Link
Hola como estas? el link no funciona paso algo ? muchas graxias
-
24 Apr 2013 2:33 PM #29
Sorry, the project has been updated. Follow the new link: https://github.com/oaugustus/direct-bundle
Otávio Augusto Rodrigues Fernandes
Net On - Soluções Tecnológicas Ltda
Desenvolvimento e Consultoria em ExtJS
www.neton.com.br
otavio@neton.com.br
(31) 3075-7868
Similar Threads
-
Ext.i18n.Bundle Using Bundles now for Sencha Touch 1.0
By elmasse in forum Sencha Touch 1.x: Examples and ShowcasesReplies: 14Last Post: 19 Jan 2012, 4:42 AM -
Resource Bundle
By sundhar_v in forum Ext GWT: DiscussionReplies: 1Last Post: 16 Sep 2009, 7:38 AM -
Image Bundle in GXT
By markrgli in forum Ext GWT: DiscussionReplies: 1Last Post: 17 Aug 2009, 11:11 PM -
Is there an Ext.js 2.0 Textmate Bundle?
By Dumbledore in forum Community DiscussionReplies: 8Last Post: 10 Jan 2009, 6:31 PM -
Image bundle
By papasi in forum Community DiscussionReplies: 4Last Post: 2 Jul 2007, 1:04 AM


Reply With Quote
