1. #21
    Sencha User
    Join Date
    Feb 2012
    Location
    Ukraine
    Posts
    11
    Vote Rating
    1
    GH1UA is on a distinguished road

      0  

    Default


    Hello. Yes, component working with 2.1.

    What is wrong?

  2. #22
    Sencha User
    Join Date
    May 2011
    Posts
    5
    Vote Rating
    0
    lduchesne is on a distinguished road

      0  

    Default


    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
    Below you will find an extract of infoController.php :
    Code:
        public function getInfosAction()
        {   
            $query = $this->getDoctrine()
                ->getEntityManager()
                ->getRepository('AUDirectoryBundle:Info')
                ->findInfos();
            return $this->get('ext_direct')
                ->createResponse(new AbstractQuery(), $query);
        }
    an extract of config.yml :
    Code:
    ext_direct:
        router:
            rules:
                getInfos:
                    defaults: { _controller: AUDirectoryBundle:Info:getInfos, params: true }
                    reader: { root: root }
    an extract of info.js
    Code:
            proxy: {
                type: 'direct',
                api: {
                    read: Ext.app.AUDirectory_Info.getInfos,
                },
                reader: {
                    type: 'json',
                    root: 'root'
                }
            }
    an extract of app.js (the function in init does not get the chance to be executed) :
    Code:
    Ext.application({
    ...
            init: function() {
                    console.log('init app');
    		Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    	},
    ...
    });
    Any help is very appreciated

  3. #23
    Sencha User
    Join Date
    Feb 2012
    Location
    Ukraine
    Posts
    11
    Vote Rating
    1
    GH1UA is on a distinguished road

      0  

    Default


    Please, show me your /api.js

  4. #24
    Sencha User
    Join Date
    Feb 2012
    Location
    Ukraine
    Posts
    11
    Vote Rating
    1
    GH1UA is on a distinguished road

      0  

    Default


    Try this:

    Code:
            proxy: {
                type: 'direct',
                api: {
                       read: Actions.AUDirectory_Info.getInfos,
                },
                reader: {
                    type: 'json',
                    root: 'root'
                }
            }

  5. #25
    Sencha User
    Join Date
    May 2011
    Posts
    5
    Vote Rating
    0
    lduchesne is on a distinguished road

      0  

    Default


    Below api.js without performing the modification you suggested :

    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}]}};
    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.

  6. #26
    Sencha User
    Join Date
    Feb 2012
    Location
    Ukraine
    Posts
    11
    Vote Rating
    1
    GH1UA is on a distinguished road

      1  

    Default


    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:
    Code:
    <script type="text/javascript" src="http://localhost/api.js"></script>
    App.js:
    Code:
    Ext.require([
       ...
        'Ext.direct.*', 
       ...
    ], function() { Ext.direct.Manager.addProvider(Actions.REMOTING_API); });
    Try use without change namespace in any places.

  7. #27
    Sencha User
    Join Date
    May 2011
    Posts
    5
    Vote Rating
    0
    lduchesne is on a distinguished road

      0  

    Default


    Thanks a lot for your help GH1UA that actually works ! I guess the provider must be defined ASAP

  8. #28
    Sencha User
    Join Date
    Mar 2013
    Posts
    5
    Vote Rating
    -2
    maurojulianayala has a little shameless behaviour in the past

      -1  

    Default No funciona el Link

    No funciona el Link


    Hola como estas? el link no funciona paso algo ? muchas graxias

  9. #29
    Ext JS Premium Member oaugustus's Avatar
    Join Date
    May 2007
    Location
    Belo Horizonte, Brazil
    Posts
    66
    Vote Rating
    2
    oaugustus is on a distinguished road

      0  

    Default


    Quote Originally Posted by maurojulianayala View Post
    Hola como estas? el link no funciona paso algo ? muchas graxias
    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

  10. #30
    Sencha User
    Join Date
    Feb 2012
    Location
    Ukraine
    Posts
    11
    Vote Rating
    1
    GH1UA is on a distinguished road

      0  

    Default Good news everyone!

    Good news everyone!


    Good_news_everyone.jpg

    New version of the ExtDirectBundle. Now with annotations!

    Quote Originally Posted by composer
    "ghua/ext-direct-bundle": "v2.3"

Similar Threads

  1. Ext.i18n.Bundle Using Bundles now for Sencha Touch 1.0
    By elmasse in forum Sencha Touch 1.x: Examples and Showcases
    Replies: 14
    Last Post: 19 Jan 2012, 4:42 AM
  2. Resource Bundle
    By sundhar_v in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 16 Sep 2009, 7:38 AM
  3. Image Bundle in GXT
    By markrgli in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 17 Aug 2009, 11:11 PM
  4. Is there an Ext.js 2.0 Textmate Bundle?
    By Dumbledore in forum Community Discussion
    Replies: 8
    Last Post: 10 Jan 2009, 6:31 PM
  5. Image bundle
    By papasi in forum Community Discussion
    Replies: 4
    Last Post: 2 Jul 2007, 1:04 AM

Thread Participants: 12

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar