final Timer t=new Timer() {
int i=0;
@Override
public void run() {
greetingService.getDataHit(
new AsyncCallback<Integer>() {
public void
onFailure(Throwable caught) {
hitLabel.setText(SERVER_ERROR);
}
public void
onSuccess(Integer result) {
hitLabel.setText(result+" and increasing ...");
}
});
i++;
if(i>8){
t.cancel();
}
}
};
t.scheduleRepeating(800);
If I understood truly this code may help to solve your problem. This
is getting an integer result from server 8 times in time interval 800
miliseconds...
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.