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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With