GWT auto refresh

拜拜、爱过 提交于 2019-12-25 05:22:13

问题


I am working in GWT project. As per the requirement, i have to provide auto-refresh to one of my screen. My senior told me to use <meta http-equiv="refresh" content="300"> in that screen page.

But as GWT code is written in java only, so i wonder how can I use it in java file.

Can somebody help?


回答1:


Depending on how you are managing history and if you are not using places. You can use the location reload event inside a timer.

If you are using places, you can use your place controller to re navigate to the same place every 30 seconds

Timer t = new Timer() {
    public void run() {
        Window.Location.reload();
    }
};
t.scheduleRepeating(30000);


来源:https://stackoverflow.com/questions/12195207/gwt-auto-refresh

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!