Annotation Interface RouteScope


@Scope("vaadin-route") @Inherited @Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface RouteScope
The lifecycle of a @RouteScope bean is controlled by route navigation.

Every scoped bean belongs to one router component owner. It can be a @Route, or a RouterLayout, or a HasErrorParameter. Beans are qualified by @RouteScopeOwner to link with their owner.

As long as the owner component stays attached, all beans owned by it remain in the scope.

Without the RouteScopeOwner annotation the owner is the current route target component (dynamically calculated). With nested routing hierarchies, the target is the "leaf" or "bottom most" routing component. The beans are preserved as long as the owner component remains in the navigation chain. It means that the bean may be preserved even if the navigation target is changed (but the "initial" calculated owner is still in the navigation chain).

Since:
Author:
Vaadin Ltd