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?
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