vaadin/spring

RouteScope: change the implementation to allow having a bean without RouteScopeOwner so that in that case the owner is the current route target

denis-anisimov opened this issue · 1 comments

Currently it's possible to use RouteScope without RouteScopeOwner.
In this case the semantic is the same as a prototype scope: the bean is never stored anywhere and is not reused.
As a result it has no sense to use it this way since there is already prototype scope.

The suggestion is :
change the impl so that the absence of the RouteScopeOwner means the scope of the current route target.
It allows to simplify RouteScope without RouteScopeOwner` usage in mpr .

Also it will allow to keep components inside the route target which are not directly referenced : they will be reused (e.g. a toggle button which replaces the content from one component to another staying inside the same route target).

This ticket/PR has been released with platform 21.0.0.