3
我正在写一个SmartGWT应用程序,并且需要每隔30秒在客户端执行一个方法。在JavaScript中,我会使用setInterval或setTimeout。来自SmartGWT客户端的轮询/间隔
我该如何在SmartGWT中做到这一点?
我正在写一个SmartGWT应用程序,并且需要每隔30秒在客户端执行一个方法。在JavaScript中,我会使用setInterval或setTimeout。来自SmartGWT客户端的轮询/间隔
我该如何在SmartGWT中做到这一点?
尝试用定时器:
Timer t = new Timer() {
public void run() {
// do the callback here
}
};
t.scheduleRepeating(30000); // repeat interval in milliseconds, e.g. 30000 = 30seconds