1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    71
    Vote Rating
    7
    Wilky is on a distinguished road

      0  

    Default Ext.ux.Ajax

    Ext.ux.Ajax


    Here we go guys with a new extension!

    Ext.ux.Ajax seems to replace the old Ext.Ajax, indeed.
    Well, that's correct :P

    Ext.Ajax is just a singleton of Ext.data.Connection, while Ext.ux.Ajax is a singleton that uses Ext.data.Connection and Ext.ux.Deferred!
    And now, here I am to show you how Ext.ux.Ajax works

    Problem:

    Code:
    Ext.Ajax.request ({
        url: 'data.json' ,
        success: function (data) {
            Ext.Ajax.request ({
                url: 'data2.json' ,
                success: function (data2) {
                    Ext.Ajax.request ({
                        url: 'data3.json' ,
                        success: function (data3) {
                            alert ("It's so hard to reach the top!");
                        } ,
                        failure: errorHandler
                    });
                } ,
                failure: errorHandler
            });
        } ,
        failure: errorHandler
    });
    How Ext.ux.Ajax solves this problem:

    Code:
    Ext.ux.Ajax
        .request ('data.json')
        .then (Ext.ux.Ajax.request ('data2.json'), errorHandler)
        .then (Ext.ux.Ajax.request ('data3.json'), errorHandler)
        .then (function (data3) {
            alert ("Ah! That's much better ;)");
        }, errorHandler);
    There's no magic behind this extension: in the request method, the AJAX request is wrapped into a promise (Ext.ux.Deferred instance) and it is returned, making the class chainable.

    For more infos/examples/docs, see the github page: https://github.com/wilk/Ext.ux.Ajax

    Sencha Market: https://market.sencha.com/extensions/ext-ux-ajax

    Have fun, fellas!
    Wilk
    Last edited by Wilky; 22 May 2013 at 11:23 PM. Reason: added sencha market link

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    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

      1  

    Default


    Just saw this thread like your other, nice
    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.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi