3.5.24. Web Page Refresh Event

UIRefreshEvent is an application event sent on each web page refresh. It’s a UiEvent, so it can be handled only by event listener methods of screen controllers.

@UiController("extMainScreen")
@UiDescriptor("ext-main-screen.xml")
public class ExtMainScreen extends MainScreen {

    @Inject
    private Notifications notifications;

    @EventListener
    protected void onPageRefresh(UIRefreshEvent event) {
        notifications.create()
                .withCaption("Page is refreshed " + event.getTimestamp())
                .show();
    }
}