Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Page refresh pushes session out of sync
I have some background thread, which works long time and changes ui. If user refreshes the page ui goes out of sync. I have an example app https://github.com/asdnf/vaadin-push-issue-test.git .
Is there a common approach to handle these errors?
Last updated on
Hi,
have you tried using the @PreserveOnRefresh annotation in your UI?
-Olli
Last updated on
+1
You're welcome! Note that introducing @PreserveOnRefresh has some potential downsides, like if your app ends up in an invalid state, you can't just reload the page to get out of it.
-Olli
Last updated on
You cannot reply to this thread.