how you can write the onclick attribute using Thymeleaf syntax: <button type = "button" th:onclick= "|rejectSalaryPayment(' ${response.uuid} ', ${dto.id} )|" >Reject Salary Payment</button> This assumes that the response.uuid and dto.id variables are available in the current Thymeleaf context. If they are not, you will need to provide the appropriate values or expressions to evaluate them. Also note that the onclick attribute is written using the Thymeleaf expression syntax ( |...| ), which allows you to include string literals and variable expressions within the same attribute value.
This blog is made specially for students those who have selected Computer Application (165) as a subject in CBSE board exam. It includes chapter wise notes, videos, assignments, etc.