In my Vaadin UI I want to display some status that is evaluated through a background thread. At the right moment an Image witn the according icon is switched to visible or invisible. But unfortunately this change seems not to be propagated to the browser. The image gets visible eventually, which is too late.
How can I speed up the information transfer from server to client?
For some reason I still use Vaadin Framework 8. @PushStateNavigation and @Push are already activated on my UI.
Hiran
If you update your UI from a background thread, you need to ensure you do it in a thread-safe manner and that Vaadin gets notified about it. The easiest way to do this is to use the ui.access()
helper:
getUI().ifPresent(ui->
ui.access(()-> {
// Update your UI here
})
);