Hybrid View

  1. #1
    Sencha User
    Join Date
    Apr 2008
    Location
    Germany
    Posts
    24
    Vote Rating
    0
    Yasheena is on a distinguished road

      0  

    Question Ext.application and Ext.direct: How to setup?

    Ext.application and Ext.direct: How to setup?


    Hi,
    I want to create an Application with Ext.application. In one controller I use a store which uses Ext.direct. Where have I to put the line "Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);"?
    If I put it before "Ext.application({..." I get the error "Ext.direct is undefined". If I put it in the " launch: function() {..." area, I get the error that the class which I implement with Ext.direct is not defined.
    What is the correct way to use Ext.direct in Ext.application?

    Greetings,
    Wolfgang

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    60
    Vote Rating
    2
    ralscha is on a distinguished road

      0  

    Default


    Hi

    Struggling with the same problem. Found this solution that works for me. Not sure if this is the "correct" approach.

    Code:
    Ext.require('Ext.direct.*', function() {
    	Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    });
    
    Ext.application({
    ....
    });
    Greetings
    Ralph

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Location
    Prague
    Posts
    38
    Vote Rating
    0
    cubernatic is on a distinguished road

      0  

    Default


    Hi, having the same problem. My solution looks follow:
    Code:
    Ext.application({
        name: 'MyApp',
        .....
    
        launch: function() 
        {
            Ext.direct.Manager.addProvider(Ext.app.DirectAPI);
        }
    });
    I have also written a rpc Json_Server class for the Zend Framework which work like the Zend_Json_Server.

    Hope it helps.

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Prague
    Posts
    38
    Vote Rating
    0
    cubernatic is on a distinguished road

      0  

    Question


    @ralscha
    The solution you provided seem not to work.
    Trying it I get an error:
    Code:
    if (!provider.isProvider) {
    BUT ONLY if I use ext-all-debug.js.
    Using ext-debug.js it work fine!

    Why???

  5. #5
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    60
    Vote Rating
    2
    ralscha is on a distinguished road

      0  

    Default


    Don't know where the problem is in your code. In my example application it works with ext.js and with ext-all.js.

    With ext-all.js you don't need Ext.require. You could try if it works after removing the Ext.require call.

  6. #6
    Sencha User
    Join Date
    Feb 2009
    Posts
    107
    Vote Rating
    0
    marman is on a distinguished road

      0  

    Default any update on this>

    any update on this>


    i am having the same issue: provider is undefined

    Code:
    <html>
    <head>
        <title>Hello Ext</title>
     
        <link rel="stylesheet" type="text/css" href="resources/css/ext-all.css">
        
        <script type="text/javascript" src="ext-all-debug.js"></script>
        <script type="text/javascript" src="app.js"></script>
    </head>
    <body></body>
    </html>
    and my app.js file:

    Code:
    Ext.Loader.setConfig({
        enabled: true
    });
    
    
    Ext.application({
        name: 'MyApp'
    
        ,launch: function() {
            
            //provide feedback for any errors
            Ext.tip.QuickTipManager.init();
    
            Ext.direct.Manager.addProvider(Ext.app.DirectAPI);
        
            //console.log('Application launch!');
            
            var viewport= Ext.create('Ext.container.Viewport', 
                    {
                        layout: 'auto',
                        items: [ {
                            region: 'north',
                            html: '<h1 class="x-panel-header">Page Title</h1>',
                            height: 100,
                            border: false,
                            margins: '0 0 5 0'
                        }, {
                            region: 'center',
                            border: true,
                            layout: {
                                type: 'hbox',
                            }
                        }, {
                            region: 'south',
                            html: '<h1 class="x-panel-header">Page Footer</h1>',
                            height: 80,
                            border: false,
                            margins: '0 0 5 0'
                        }, ]            
                    });
        }
    });

  7. #7
    Sencha User
    Join Date
    Dec 2010
    Posts
    8
    Vote Rating
    0
    helloaccp is on a distinguished road

      0  

    Default


    This is really timely.ralscha Thank you.

  8. #8
    Sencha User
    Join Date
    Dec 2010
    Posts
    8
    Vote Rating
    0
    helloaccp is on a distinguished road

      0  

    Default


    Quote Originally Posted by ralscha View Post
    Hi

    Struggling with the same problem. Found this solution that works for me. Not sure if this is the "correct" approach.

    Code:
    Ext.require('Ext.direct.*', function() {
        Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);
    });
    
    Ext.application({
    ....
    });
    Greetings
    Ralph
    This is really timely. ralscha Thank you.

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