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();
        }
    });
}


Natan.

Em 20/09/2016 07:40, David escreveu:
If you only need to support modern browsers then I really would go the WebSockets way. Its really simple to implement with JSInterop. I did so in combination with GWT Jackson and RequestBuilder. On the server side I used Jersey. Unfortunately I cannot publish this code since it is closed source.

On Tue, Sep 20, 2016 at 12:16 PM Frank <frank.wyna...@gmail.com> wrote:
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-toolkit+unsubscr...@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.
--
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+unsubscr...@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.

--
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+unsubscr...@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.

Reply via email to