Automatically update an object on other pages without reloading

Asked

Viewed 229 times

0

Good afternoon! I would like to know how I can update an object in my view without having to reload the page. For example, on the main page of the system, I have 3 panels that shows the amount of calls by status: Solved, Pending and Unresolved. I also have a table that lists up to 10 Pending attendances. How can I refresh this without reloading the page? Like Facebook notifications. I am developing this system using Java, Bootstrap, Thymeleaf and Spring Boot

  • Utilize setInterval and Ajax.

  • I think the most current solution for this is using WebSocket, take a look at the library socket.io

  • I’ll look into it, thank you @Renan !

  • @Antonio I’ll take a look at this lib too, you would have some example of use?

  • @Cisinojunior on the website of socket.io have an example building a chat https://socket.io/get-started/chat/ , as you are already using Spring Boot, has an example on their own website of Websocket, you can take a look https://spring.io/guides/gs/messaging-stomp-websocket/ , works basically the same, maybe changes a bit of the socket.io, but the principle is the same

  • @Antonio valeuuuu! I will start studying this now to be able to implement in my system. Thank you!!!

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.