--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
I do this using signalR (for which I built a GWT wrapper (not opensource).But maybe you should look into websockets or atmosphere (which uses websockets).
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Make a timer that fires every X seconds.
Button refresh = new Button();
Time temporizador = new Timer() {
@Override
public void run() {
dispara();
}
};
// 2 seconds
temporizador.scheduleRepeating(2000);
private final void dispara() {
refresh.setFocus(true);
refresh.fireEvent(new GwtEvent<ClickHandler>() {
@Override
protected void dispatch(ClickHandler handler) {
handler.onClick(null);
}
@Override
public
com.google.gwt.event.shared.GwtEvent.Type<ClickHandler>
getAssociatedType() {
return ClickEvent.getType();
}
});
}
Others have suggested websockets, but there are several other options as well. There is google cloud messaging and many other libraries to solve this problem as well as ServerSent Events.
If none of those are options, try to avoid using a regular timer. More timers, more problems. If you must use a timer like object, I would suggest using gwt Scheduler instead.
--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/zsyG1NKf2p8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.