weixin_39927799 2020-11-30 09:01
浏览 0

Provide reload event for UI classes with @PreserveOnRefresh

Originally by cmj

There are many cases where you like to keep most of the state of some application, but have to provide updated content on browser refresh (F5).

Currently there is no way to detect events like that without digging deep the bowels of Vaadin request handling, subclassing VaadinServlet/VaadinServletService and ServletUIInitHandler and extend getInitialUidl() [reinitUI() would be better but is a private method].

It would be great to have a way to register on reload events via tomething like Page.addPageReloadedListener().

Imported from https://dev.vaadin.com/ issue #12191

该提问来源于开源项目:vaadin/framework

  • 写回答

3条回答 默认 最新

  • weixin_39927799 2020-11-30 09:01
    关注

    Originally by

    One workaround is to override UI.beforeClientResponse(boolean initial) since initial will be true for the first load as well as directly after a refresh.

    评论

报告相同问题?