1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    12
    Vote Rating
    0
    RyanPays is on a distinguished road

      0  

    Default Unanswered: Periodically loading a Store with JSON data from Ajax request

    Unanswered: Periodically loading a Store with JSON data from Ajax request


    Hi,

    Am new to ExtJS and have been asked to implement long polling for a project i am curretnly working on.

    I have set up a POC that re-initialises a request and on timeout error to mimic the long polling to the server.

    Am also utilising the echo feature to mock and AJAX request with JSFiddle.

    I have created my POC:

    http://jsfiddle.net/9Zx8H/2/

    I am not proving the concept and need to do so!

    Can you please help.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    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

      0  

    Default


    Instead of doing an Ext.Ajax request why not give your store a proxy and then load the store?
    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.

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    12
    Vote Rating
    0
    RyanPays is on a distinguished road

      0  

    Default


    Thanks for the reply.

    I could not figure out how to implement long polling like in the original example with the proxy.

    So set a long timeout and then on success or timeout re-init the request.

    Agree that it would be far neater to implement a proxy but looking at the documentation i was not sure if i had access to success and failure callbacks to implement the long polling.

Thread Participants: 1

Tags for this Thread