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
@PreserveOnRefresh doesn't preserve UI scoped beans #293
Comments
See the user level explanation here: |
The solution is: But there is future way to do it
There is already So the implementation should be changed. Also it would be good (it's not clear whether this is feasible) to avoid using an additional qualifier for the scope owner: do it somehow in a way similar to Spring. But may be this is not possible. |
I have a simple POC to support current V14 behaviour. As it said it is not what users expect, but at least it is in pair with current If vaadin will support preserve on reload for the entire UI by moving all components to a new UI, then all UI scoped, and route scoped beans can be preserved same way. In fact it would be a little simpler. It can be found here: kumm@f4d0910, kumm/flow@c7e66c3 |
see #369 |
Closing this as a won't fix, as the issue is addressed in https://github.com/vaadin/cdi/releases/tag/13.0.0.alpha1 (version for Vaadin 21) with changing the behavior of We don't have plans at the moment for backporting the fix to the Vaadin 14 version of CDI add-on as it is a behavior change and could affect existing applications. If someone needs this badly for Vaadin 14, we could maybe make a new intermediate version where the feature is backported, and then users can opt-in to use it. Please comment here if that would be desired. |
The behaviour of @PreserveOnRefresh+CDI within Vaadin 14 differs from that of Vaadin 8. In the current version scope'd beans can differ after a refresh which did not happen in V8.
Related: vaadin/spring#473
The text was updated successfully, but these errors were encountered: