Annotation Interface PreserveOnRefresh
This annotation can also be used, when exporting embeddable web components.
Place this annotation onto the class extending
WebComponentExporter. This flags all the
embedded components from that exporter to be preserved on refresh. Due to the
challenge of uniquely identifying embedded components through refresh, when
embedded, the component is identified by window name and a generated
component id. This means, that if the same component instance is embedded
onto two pages within the same window context, the state can be transferred
between locations. To avoid state leaking, provide unique id for the embedded
web component. The id must be unique across all the pages where instances of
the web component are embedded.
- Since:
- 2.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanSet to true if refresh should also reuse partial chain components of stored view chain.
-
Element Details
-
partialMatch
boolean partialMatchSet to true if refresh should also reuse partial chain components of stored view chain.This means that when navigating from a preserve on refresh target to a new url in the same client window context, where windowName matches, the router layouts that have been preserved will be reused without re-creation for the new route.
Default is
falseso only url match is repopulated.- Returns:
trueif partial chain match should be checked and used
- Default:
false
-