0

I have a table with some rows that need to be updated every x seconds. A row keeps on asking for updates until it receive a certain value.

I've already read something on fragments but I need more specific examples.

I want to learn how to achieve this behaviour without using javascript/AJAX (I already know them).

<table>
     <tr> <!--If simulation.completed=false, this row need to be updated-->
        <td th:text="${simulation.completed}"></td> <!--(true or false)-->  
        <td .... </td> <td>....
     </tr>
     <tr> <!--If simulation.completed=false, this row need to be updated-->
        <td th:text="${simulation.completed}"></td> <!--(true or false)-->  
        <td .... </td> <td>....
     </tr>
     <tr> <!--If simulation completed=false, this row need to be updated-->
        <td th:text="${simulation.completed}"></td> <!--(true or false)-->  
        <td .... </td> <td>....
     </tr>
</table>

1 Answer 1

1

You cannot do this with only Thymeleaf. Thymeleaf is server-side. It will render the page and your application sends the page to the client. You will need to use client-side scripts like JavaScript to do this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.