Skip to content
Advertisement

Tag: thymeleaf

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 while using the POST request. What is the problem? model AnkiCardDto DTO for response data from table All code you look

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 there. Configured http://www.customdomain.com/hostingpath/ to be the root path for the app. So that should map to what locally is http://localhost:8080/. Now when I access http://www.customdomain.com/hostingpath/home I’m getting

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 in order to highlight search keywords inside the sentence string. Example: seach keyword is “Macron” and the sentence queried from database is “Emmanuel Macron meets Angela Merkel on Friday to discuss

How to send PUT/PATCH/DELETE requests in thymeleaf template?

How can I send a DELETE request with thymeleaf? I tried as follows: But all that I get is: org.springframework.web.HttpRequestMethodNotSupportedException: Request method ‘POST’ not supported Answer If you are using Spring Boot 2.2+, you need to enable support for this explictly. Add the following to application.properties: Spring Boot < 2.2 always registers the filter, for Spring Boot 2.2 or higher

How to pass object to modal dialog in Thymeleaf?

I have a thymeleaf page that shows database content (persons) in a table. The last column should be a button that deletes the row. But prior, show a modal dialog with the data being deleted. Question: how can I pass the the full row person object to a modal dialog? I started as follows, but I’m missing how I could

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: And then use as This would make it a lot easier to work with bigger html that would be kinda ugly to write in an attribute. (Basically I’m looking for a similar functionality to Blade’s views and slots) EDIT: I’m

Dynamic HTML in Thymeleaf

I am creating a Spring MVC + Thymeleaf project. I would like the user to have control over some parts of the page, meaning that user could change text and format is as well with colors, font sizes, etc., using HTML tags. However, I have not found any way how to insert dynamic HTML into thymleaf HTML template. Is there

Advertisement