Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8937517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:25:48+00:00 2026-06-15T10:25:48+00:00

I have implement a Comet solution with Ext.Ajax.request() so that when a timeout occurs

  • 0

I have implement a Comet solution with Ext.Ajax.request() so that when a timeout occurs or a successful response has been received then the same request is re-initialised.

    var http = {

    requestId: 0,
    request: function(timeout){

        Ext.Ajax.request({
            url: '/echo/json/',
            timeout: timeout || 10000,
            method: 'POST',
            scope: http,    // scoped to the http object
            params: {
                json: Ext.encode({ 
                    data: [
                        {
                            id: 1,
                            type: 'notification',
                            timestamp: Ext.Date.format(new Date(), 'timestamp'),
                            from: 1445261,
                            to: 1402804,
                            read: false,
                            important: true,
                            content: 'Lorem ipsum...'
                        } 
                    ]
                }),
                delay: 5
            },
            success: function(resp) {
                if (resp.status === 200){
                    console.log('success');                
                    this.request();   
                }
            },
            failure: function(resp, opts) {
                if (resp.timedout === true) {
                    console.log('failure');  
this.request();                       
                } else {                   
                }
            },
            callback: function(options, success, resp) {
                if (this.requestId === 0) {
                    this.requestId = resp.requestId;
                } 
            }
        }); 

    }

};

http.request();​

I would like to implement this within Ext JS MVC and utilise the native proxy to get the data from the server and load it into the Store via the model.

Looking at the documentation i cannot see how this can be done as you do not seem to have access to the success and failure callbacks as in the Ext.Ajax.request method.

Does anyone know how to implement long-polling with the Ext MVC architecture?

The example code above utilises JSFiddle ajax JSON response echo:

http://jsfiddle.net/Dd8q4/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:25:48+00:00Added an answer on June 15, 2026 at 10:25 am

    The way I see it there are 3 ways to go:

    1. A more interesting one, clean and perhaps more challenging one would be to extend the proxy class to keep the connection alive. There is an example of proxy extension to work with Flicker API (sencha blog entry). This might help you get started.

    2. Parse the response manually and create Model objects from the response data and insert them into your store manually.

    3. Use store callback method to perpetually load the store as you do with the Ajax request. Scroll down to Dynamic Loading section of the store API for an example of loading store with callback function. Also there is a load event listener that kicks in after the data is read.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to implement a sparse matrix (a matrix that has predominantly zeroes, so
I have implement the exact same concept for my project- http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/ My question is,
I'm trying to find or implement a simple solution that can sequentially queue up
I have to implement a single signon kind of solution on my website. Let's
In my next project I will have to implement an automation solution to test
I have an interesting situation that my usually clever mind hasn't been able to
I have implement a scenario which involves two way communication between child and parent
clients :has_many :project,:roles I have implement but its not a good implementation..
I have to implement an Image Gallery for the iPhone iOS. Pictures are loaded
I have to implement a iphone application which will record user's voice as you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.