We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.annotations.
Annotation Type PreserveOnRefresh
-
@Target(TYPE) @Retention(RUNTIME) @Inherited public @interface PreserveOnRefresh
Marks a UI that should be retained when the user refreshed the browser window. By default, a new UI instance is created when refreshing, causing any UI state not captured in the URL or the URI fragment to get discarded. By adding this annotation to a UI class, the framework will instead reuse the current UI instance when a reload is detected.
Whenever a request is received that reloads a preserved UI, the UI's
refresh
method is invoked by the framework.By using
UIProvider.isPreservedOnRefresh(com.vaadin.server.UICreateEvent)
, the decision can also be made dynamically based on other parameters than only whether this annotation is present on the UI class.Since:
7.0.0
Author:
Vaadin Ltd