Use value of a local variable as global in thymeleaf

I have a variable that is obtain inside each block in thymeleaf. I want to send that variable to a certain method in my controller. The limitation is that the variable is obtain inside a block which …

How I can send POST request with data from table?

I want to send POST request with data which is stored in a HTML table. I’m using thymleaf. I tried to send GET request with data for build table, but I didn’t get the response data from the table …

Deployed .war generating error: template might not exist or might not be accessible

I have a spring boot application that runs fine on localhost. I access it with http://localhost:8080/home. Now I want to deploy the application to a hosting server. Generated the .war and deployed it …

Changing colour of substring in Thymeleaf table cell not working

I am rewriting old legacy system written in PHP/HTML into Java/SpringBoot/Thymeleaf. In the old system, there is table displaying search result. In the column “Sentence” I call this function …

How to hide/show thymeleaf fields based on controller condition?

I have a Spring MVC application with thymeleaf. Depending on a condition tested in the controller method I want to show or hide an html element from the view (input, span, div, button…). How to do …

How to pass object to modal dialog in Thymeleaf?

I have a thymeleaf page that shows database content (persons) in a table.

<td th:text="${row.firstname}&…

Pass Thymeleaf block content as variable to fragment

I’m trying to create a fragment that represents a card with custom content. I would like to do something like:

Thymeleaf’s form dont return the object to controller class’s method

I have a SpringBoot-MVC Java application with JPA/Hibernate, using a H2 database to store data and I’m trying to read and change lines of this database through web browser. I had success with the …

Thymeleaf LD+JSON output quote escaped

I am generating LD+JSON string on server and I need to output it on client using Thyemeleaf. Generated JSON looks like this on server: { “@context” : “http://schema.org”, “…

endless hibernate query in thymeleaf for classes @OneToMeny and @ManyToOne

everybody, I’ve built myself two classes that are circulating. additive class @Entity @Table(name = “additive”, schema = “dbo”) @Data @NoArgsConstructor public class Additive{ @Id @…