Ext.ux.JSONP for ExtJS 4 1


Here is a solution for making simple JSONP requests in ExtJS 4

Ext.define('Ext.ux.JSONP', {
    extend: 'Ext.data.ScriptTagProxy',
    alias: 'ux.jsonp',

    createRequestCallback: function(request, operation, callback, scope) {
        var me = this;
        
        return function(response) {
            callback.apply(scope, [response]);
            
            operation.setCompleted();
            operation.setSuccessful();
            me.afterRequest(request, true);
        };
    }
});

No related content found.

Share

Leave a comment

One thought on “Ext.ux.JSONP for ExtJS 4

  • Raghuram Reddy Gottimukkula

    I tried to use New infinite scrolling Ext JS4 grid which buffers the data on scroll. The problem i am facing is buffering is not happening and grid is not loading with data if i use jsonp format.
    I used type as ajax which uses json, it is loading the data. still buffering is not happening.

    suggestions pls.

    Thanks and Regards,
    Raghuram Reddy Gottimukkula
    Adobe Certified ColdFusion Professional
    Hyderabad India