Thursday, January 23, 2014

problem with asynchronous call

I have a problem with RPC call in GWT. I am a beginner. can any one help me to solve this.

below is an example code snippet:

I have four columns in my UI with effdate and enddate as column header.
The values are not displaying in order. The first column value is displaying in 3rd column.
most of the time the order changes.Displaying randomly.

I guess the RPC call to the service method for each count is delayed.
and I found out by debugging the effdate and end date that i am passing for first loop is executing 2nd or 3rd sometimes. It is shuffling.

Can anyone tellme what changes i need to do in my code to get correct values displayed in UI.

List finalList = new arrayList();
effdate= list.get(countincr);
enddate= list.get(countincr+1);
//call to service to fetch values from DB by passing effdate and end date as parameter.
grp.ratecalc(startdate,enddate,new AsyncCallback<List<grVo>>()
public void onfailure(throwable caught)
public void onsuccess(List<grVo> result)
List grpList= new GrpVO();

rate = result.get(0).getrate();
rate1 = result.get(0).getrate1();


setting values in bean for  the remaining values in the result.


if(finalList.size()== count)
//calling a method to populate the values


}  //end of for loop

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment