Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align @RouteScoped implementation with @RouteScope impl for Spring add-on #369

Closed
denis-anisimov opened this issue May 31, 2021 · 3 comments · Fixed by #370
Closed

Align @RouteScoped implementation with @RouteScope impl for Spring add-on #369

denis-anisimov opened this issue May 31, 2021 · 3 comments · Fixed by #370

Comments

@denis-anisimov
Copy link

Several things needs to be done:

  • Don't store beans inside UI instance but use window name (when available) and store things inside a VaadinSession.
  • Don't allow to use scope when scope context is not available (right now the scope will be used regardless of the route component presence : but if the context is not available everything will be destroyed. The injection should not be even done at all if the scope context is not available). To be able to implement this BeforeEnterListener should be used along with AfterNavigationListener.
  • RouteScoped without RouteScopeOwner should behave differently than now: it should use the current bottom-most navigation target component as a context.
@denis-anisimov denis-anisimov changed the title Alight @RouteScoped implementation with @RouteScop impl for Spring add-on Align @RouteScoped implementation with @RouteScop impl for Spring add-on May 31, 2021
@denis-anisimov
Copy link
Author

see #293

@denis-anisimov denis-anisimov changed the title Align @RouteScoped implementation with @RouteScop impl for Spring add-on Align @RouteScoped implementation with @RouteScope impl for Spring add-on May 31, 2021
@denis-anisimov denis-anisimov self-assigned this Jun 1, 2021
@denis-anisimov denis-anisimov moved this from Ready To Go to In progress in OLD Vaadin Flow ongoing work (Vaadin 10+) Jun 1, 2021
denis-anisimov pushed a commit that referenced this issue Jun 4, 2021
- presere beans for PreserveOnRefresh views
- reimplement absent RouteScopeOwner semantic
- do not allow to use (route) scope when it's not available

fixes #369
denis-anisimov pushed a commit that referenced this issue Jun 4, 2021
- presere beans for PreserveOnRefresh views
- reimplement absent RouteScopeOwner semantic
- do not allow to use (route) scope when it's not available

fixes #369
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from In progress to Done - pending release Jun 7, 2021
denis-anisimov pushed a commit that referenced this issue Jun 7, 2021
)

* feat: reimplement @RouteScoped to keep beans for PreserveOnRefresh

- presere beans for PreserveOnRefresh views
- reimplement absent RouteScopeOwner semantic
- do not allow to use (route) scope when it's not available

fixes #369

* chore: make minor corrections and add ITs

* chore: correct test class
@vaadin-bot
Copy link

This ticket/PR has been released with platform 21.0.0.alpha5. For prerelease versions, it will be included in its final version.

@vaadin-bot
Copy link

This ticket/PR has been released with platform 22.0.0.alpha1 and is also targeting the upcoming stable 22.0.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment