Hi,
how will I know when a @PreserveOnRefresh
-annotated view gets refreshed?
Is there any listener to attach to the view?
Thanks,
MZ
Hi,
how will I know when a @PreserveOnRefresh
-annotated view gets refreshed?
Is there any listener to attach to the view?
Thanks,
MZ
Hi Marco, I’m afraid such a feature is not supported by Vaadin. However, listening to navigation lifecycle events, e.g. AfterNavigationEvent, might help you. See https://vaadin.com/docs/v14/flow/routing/tutorial-routing-lifecycle.html#afternavigationevent. Whenever the page is refreshed AfterNavigationEvent is fired.
Hi Mehdi, thanks for your reply: I’ll have a look, it might be useful.
Thanks,
MZ
I tried this feature but - as I run in a single-view mode, whose content is modified on state changes - the event is not always fired.
So, having a refresh() method to override (like in Vaadin 7-8) would be very useful.
I opened a specific [ticket]
(https://github.com/vaadin/flow/issues/6453).
Thanks,
MZ