I am currently using the Thymeleaf attribute to render data, but I am now looking to add a "Search" button without reloading the page.
Within the attribute departments
, I am rendering a List<Department>
from the database. While I understand how to achieve this using ajax, it requires me to replace the attribute with a RestController that returns JSON data. Is there a way to fetch data from the attribute without having to reload the page? Perhaps through ajax, JavaScript, or another method?