You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
beforeEnter is called multiple times with @PreserveOnRefresh #12356
Having @PreserveOnRefresh on the root layout, the child view/layout's beforeEnter() callback is called multiple (level of nesting) times when refreshing the page
Minimal reproducible example
See the attached project.
Go to localhost:8080, see that the beforeEnter() is called only once for each view/layout
Refresh the page, see the count of beforeEnter() call for each view/layout is increased by the number of its nesting level.
Expected behavior
the child view/layout's beforeEnter() callback is called only once when refreshing the page
Actual behavior.
the child view/layout's beforeEnter() callback is called multiple (level of nesting) times when refreshing the page.
Versions:
- Vaadin / Flow version: Vaadin 14, Vaadin 22
- Java version: OpenJDK Runtime Environment Corretto-16.0.1.9.1 (build 16.0.1+9)
- OS version: macOS Monterey
- Browser version (if applicable): 95.0.4638.69 (Official Build) (x86_64)
- Application Server (if applicable): 9.4.36.v20210114
- IDE (if applicable): VS Code
Activity
fix: remove duplicates when collecting BeforeEnterObservers (#12451)
fix: remove duplicates when collecting BeforeEnterObservers (#12451)
fix: remove duplicates when collecting BeforeEnterObservers (#12451)
fix: remove duplicates when collecting BeforeEnterObservers (#12451)
fix: remove duplicates when collecting BeforeEnterObservers (#12451)
fix: remove duplicates when collecting BeforeEnterObservers (#12451) (#…
fix: remove duplicates when collecting BeforeEnterObservers (#12451) (#…
fix: remove duplicates when collecting BeforeEnterObservers (#12451) (#…
fix: remove duplicates when collecting BeforeEnterObservers (#12451) (#…
vaadin-bot commentedon Dec 7, 2021
This ticket/PR has been released with platform 14.8.0.beta1 and is also targeting the upcoming stable 14.8.0 version.
vaadin-bot commentedon Dec 7, 2021
This ticket/PR has been released with platform 14.7.8.
vaadin-bot commentedon Dec 9, 2021
This ticket/PR has been released with platform 22.0.1.