larryq
larryq

Reputation: 16309

Asynchronously updating an Ext.Component in Sencha Touch / Ext.JS

I have an Ext.List in my Sencha app that I would like to render as quickly as possible, then update asynchronously-- in this case, the list contains addresses, and I'd like to reserve some space at the right on each list item for the distance from the user, to be calculated using sencha's location services.

The location calcs could take a few seconds for each address, so I'd like to do that in an asynchronous manner, then update each list entry as the information becomes available. Does anyone have suggestions on how I might go about this? Thanks much.

Upvotes: 0

Views: 666

Answers (1)

Abdel Raoof Olakara
Abdel Raoof Olakara

Reputation: 19353

I don't work with Sencha Touch, but one possible solution that I can think of is to use the afterrender event of Ext.List and trigger ajax requests. So, each request will be asynchronous and will update the distance independently.

But the issue with this is you might have more number of requests to the servers.

Upvotes: 1

Related Questions