3

I'm writing a SmartGWT application and need to execute a method on the client side every 30 seconds. In javascript I would use setInterval or setTimeout.

How do I do this in SmartGWT?

Ben Noland
  • 34,230
  • 18
  • 50
  • 51

1 Answers1

5

Try with a Timer:

Timer t = new Timer() {
          public void run() {

             // do the callback here
          }
    };
    t.scheduleRepeating(30000); // repeat interval in milliseconds, e.g. 30000 = 30seconds
zero_r
  • 208
  • 2
  • 6