Vaadin进修扩展不';行不通

Vaadin进修扩展不';行不通,vaadin,vaadin7,refresher,vaadin-refresher,Vaadin,Vaadin7,Refresher,Vaadin Refresher,我试图简单地使用如下所示的Refresh插件,但它似乎不起作用。我尝试在Chrome和firefox中运行这个示例。我将项目导出为WAR,并将其部署到tomcat webapps文件夹中 package com.example.vaadinapp; import javax.servlet.annotation.WebServlet; import com.github.wolfie.refresher.Refresher; import com.github.wolfie.refreshe

我试图简单地使用如下所示的Refresh插件,但它似乎不起作用。我尝试在Chrome和firefox中运行这个示例。我将项目导出为WAR,并将其部署到tomcat webapps文件夹中

package com.example.vaadinapp;

import javax.servlet.annotation.WebServlet;

import com.github.wolfie.refresher.Refresher;
import com.github.wolfie.refresher.Refresher.RefreshListener;
import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.Page;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

@SuppressWarnings("serial")
@Theme("vaadinapp")
public class VaadinappUI extends UI {

    Refresher refresher;
    Label timeLabel;
    Page page;

    @WebServlet(value = "/*", asyncSupported = true)
    @VaadinServletConfiguration(productionMode = false, ui = VaadinappUI.class)
    public static class Servlet extends VaadinServlet {
    }

    @Override
    protected void init(VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        setContent(layout);

        refresher = new Refresher();
        page = this.getPage();
        timeLabel = new Label(String.valueOf(page.getWebBrowser().getCurrentDate()));

        refresher.setRefreshInterval(1000);
        refresher.addListener(new RefreshListener() {
            @Override
            public void refresh(Refresher source) {
                timeLabel.setCaption(String.valueOf(page.getWebBrowser()
                        .getCurrentDate()));
            }
        });
        addExtension(refresher);

        layout.addComponent(timeLabel);

    }

}

我做错了什么?我也用
SimpleDateFormat
尝试了相同的例子,而不是使用
WebBrowser getCurrentDate()
,但仍然存在相同的问题,因为vaadin 7.2不需要refesher插件。只需启用推送支持