tags:

views:

72

answers:

3

how to make my U_store.load() waiting infinitely

var U_store = new Ext.data.JsonStore({      
    id:'jfields',
    totalProperty:'totalcount',
    root:'rows',
    url: 'first-utility/index_json.php', 
});

my index_json.php returns result in 10 min but the load() in extjs does not wait so much it return immediately , can somebody help me how to get result from index_json.php ??

+1  A: 

Your users are going to wait 10 mins for data to load?

You'd probably be better off with a solution based on periodic polling rather than "infinte" waiting. Maybe the initial call starts your long process and you have a separate call that checks for the results? Without knowing what you're doing it's hard to know what the best approach is.

bmoeskau
hi there i am using curl to gather data from different websites and displaying it in extjs , the curl module in php is already built cannot get the data in extjs
Extjs Commander
also i am big fan of ur solutions :)
Extjs Commander
in my program, user selects the data to gather from net from 'extjs form' than it goes to server , server collects info from around the world and get back to user :) so 10 min is justified
Extjs Commander
Does the info travel by bus? ;)
bmoeskau
nope info comes from Https servers and these server has lot to stop robots it hardly 10 lines but it is needed
Extjs Commander
A: 

Why don't you gather all information and save it in the database/file by a separate process and then you can easily load store from database data.

In fact if it takes 10 minutes to load the data then I think it should be a huge amount of data. If possible then you can go for partial loading of data depending on the client events/actions.

Swar
i my program user selects the data to gather from net from extjs form than it goes to server server collects info from around the world and get back to user :)
Extjs Commander
A: 

To answer his question as asked, I'd try to use the Ext.Ajax object since you can define a timeout on there.

On the success of the Ajax you can take the response object and create the data store using something like :

var myResponseData = response.responseText;
myStore.loadData(myResponseData);

The drawback to going this route is that you cannot use to Ext.Ajax again while it is processing the query since it is a static member.

It might take some tweaking but I hope the basic idea is sound. If anyone sees a problem with this idea, I'd like to know. This has me thinkin'

It Grunt