Re: Multiple Json requests problem in parsing

2008-12-31 Thread mooreds
Hi Jake H, As far as I can tell, there are two ways to make multiple dependent remote calls in GWT and have the data come together in one display. The first is what you suggested in your Dec 18/6:10am post: make a call to source 1, then in the request call back, make a call to source 2, then in

Re: Multiple Json requests problem in parsing

2008-12-18 Thread jake H
Okay i found a solution :) "Typically, applications receive asynchronous responses in some sort of callback method. Java does not have a way of passing method pointers around, so it usually accomplishes this through interfaces. The provider of the asynchronous resource defines a public interface

Re: Multiple Json requests problem in parsing

2008-12-18 Thread jake H
no difference. i created 3 callback and call them one by one but at the end i have to use a while loop in the draw_table() function and wait same secs as i waited when i use one callback for the 3. Is there any other solution? to use another method for example instead of RequestBuilder ?? --~--~-

Re: Multiple Json requests problem in parsing

2008-12-18 Thread jake H
Yes i m using one callback for all! :p i ll try what u said and i ll let u know. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@goog

Re: Multiple Json requests problem in parsing

2008-12-17 Thread wouter
Do you use the same RequestCallback object for all requests ? That would explain your problem, responses arrive in a random order and your callback has no way of knowing what response it's handling. If I'm right, perhaps try using a specific callback per request. On Dec 17, 12:25 pm, jake H wrot

Re: Multiple Json requests problem in parsing

2008-12-17 Thread jake H
Ty , indeed the problem was the asynchronous communication. I put a while loop which runs till all the array is filled with the appropriate data. The problem is that this can run in infinity!!! ( it took around 4 sec for my application to be drawn , imagine if i had more data to retrieve?!) Is t

Re: Multiple Json requests problem in parsing

2008-12-17 Thread jhulford
In GWT requests happen asynchronously (ie. they don't block at the call point waiting for the server's response) so your draw table is being executed while your requests are still being sent to the server. You have to design your code so that any code dependent on the results of your server calls

Re: Multiple Json requests problem in parsing

2008-12-17 Thread jake H
ok i did something similar to deadlock technique to get the data ordered. But i still has a problem with the fill in. What i mean is: To avoid having nullpointer in the array i fill it with error msgs. for (int i=0; ihttp://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~--

Re: Multiple Json requests problem in parsing

2008-12-17 Thread Thomas Broyer
On 17 déc, 12:25, jake H wrote: > so is there any solution about asynchronous communication? > should i work with deadlocks? Actually, i'm not sure I've undertood your problem correctly. What isn't in the order you'd like? object properties from parsed JSON? or HTTP responses? Also I'm not s

Re: Multiple Json requests problem in parsing

2008-12-17 Thread jake H
so is there any solution about asynchronous communication? should i work with deadlocks? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Tool

Re: Multiple Json requests problem in parsing

2008-12-16 Thread Pavel Byles
I agree.. not strange in terms of the order of the received responses.. but order of the data itself.obj1, obj2 vs obj2, obj1... that's fine unordered obj1, unordered obj2.. not fine. On Tue, Dec 16, 2008 at 1:08 PM, Christian Wolf wrote: > > Not strange at all. There is no guarantee a server sen

Re: Multiple Json requests problem in parsing

2008-12-16 Thread Christian Wolf
Not strange at all. There is no guarantee a server send its responses in order of the requests. If a request is processed it gets responded. Never rely on order. That's just another part of asynchronous. On 16 dez, 13:20, "Pavel Byles" wrote: > That's a strange one.I've never encountered that pr

Re: Multiple Json requests problem in parsing

2008-12-16 Thread Pavel Byles
That's a strange one.I've never encountered that problem before. But it shouldn't matter what order your JSON objects are received. Have you tried some other tools like Firebug to see exactly what the data looks like when the client receives it? On Tue, Dec 16, 2008 at 9:23 AM, jake H wrote: > >

Multiple Json requests problem in parsing

2008-12-16 Thread jake H
Hello, In a application i m trying to make , i need in order to successfully create it , to get some data from different Json requests. for ex Name, L_Name , address , tel Accordingly i call , using a for loop , each time a json request with different url. then i extract and save the data. No