3.5.24. 网页刷新事件

UIRefreshEvent 事件会在每次网页刷新时发送。这个事件是一个 UiEvent,所以只能在界面控制器的事件监听器处理。

@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();
    }
}