I needed an infinite UI Updater, because I am building an chat. Because the Updater is ran asynchronously in a CompletableFuture, I had to get the UI from somewhere.
Unfortunately I found no other way than the following to get the UI in my layout class - the chat has to work in a [Tab]
(https://vaadin.com/components/vaadin-tabs), which is initialized by an AppLayout ([my function]
(https://pastebin.com/Vn7X73uW)), not sure if that’s the trigger…
The only way I could get it, was by start updating the chat in the onAttach(AttachEvent attachEvent) function.
The problem is, when the page is restarted, the Updater gets interrupted because it is somehow null. I include the chat service using @Autowired. Do anyone have an solution?
Hi! If you are developing a chat, you should think about implementing the MQTT protocol for message logic, so you no longer have to refresh the site all the time.
Diego Ergui:
Hi! If you are developing a chat, you should think about implementing the MQTT protocol for message logic, so you no longer have to refresh the site all the time.
Sounds great! but how to use Polymer or Webcomponents? Haven’t found out until now
Diego Ergui:
Hi! If you are developing a chat, you should think about implementing the MQTT protocol for message logic, so you no longer have to refresh the site all the time.