How to refresh a vaadin page with the refresh button

dhS picture dhS · Sep 12, 2016 · Viewed 13.2k times · Source

I need to refresh the page in vaadin. I created a Refresh Button but the button is not working for refreshing the page.

Button Refresh = new Button("Refresh");
Refresh.addClickListener(new Button.ClickListener() {
    @Override
    public void buttonClick(Button.ClickEvent clickEvent) {
    }
});

Answer

AndyW picture AndyW · Aug 31, 2018

For Vaadin 10:

Call this in your Button ClickListener:

    UI.getCurrent().getPage().reload();