27 Nov 2012 5:53 PM #1
Unanswered: Periodically loading a Store with JSON data from Ajax request
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:
I am not proving the concept and need to do so!
Can you please help.
29 Nov 2012 12:58 PM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Instead of doing an Ext.Ajax request why not give your store a proxy and then load the store?Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.
29 Nov 2012 5:16 PM #3
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.