Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Polling / Interval from SmartGWT Client

Tags:

smartgwt

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?

like image 712
Ben Noland Avatar asked Dec 05 '25 01:12

Ben Noland


1 Answers

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
like image 126
zero_r Avatar answered Dec 07 '25 14:12

zero_r



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!