Questions tagged [spring-thymeleaf]

289 questions
1
vote
0 answers

sec:authorize in js append html as string not work

I'm new to JS HTML JQuery ajax and I currently have an issue with my HTML case. To describe the most exactly what I'm facing right now first I'll talk about the process. The project is about SpringMVC + Thymeleaf & Thymeleaf Security5 + Spring…
wnotunas
  • 130
  • 1
  • 10
1
vote
1 answer

HTMX Form and Select option with Springboot & Thymleaf

I want to submit a form with date range & also provide page size from a distinct select option element dynamically using htmx But HTMX is not passing the value of Select option elements to my java Controller HTML:
1
vote
2 answers

Thymeleaf view not found with CompletableFuture

I have a strange issue. Given this controller code: return CompletableFuture .supplyAsync(() -> this.acknowledgementTemplatingService.prepareHtmlViewForDocument(offer)) .thenApply(htmlContent ->…
1
vote
1 answer

How to remove the ROLE_ prefix in Spring Security 6 and Spring Boot 3?

The Problem In Spring Security 6 and Spring Boot 3, how can I remove the ROLE_ prefix using Java Configuration? I have a project using Spring Security 6, Spring Boot 3 and Thymeleaf. When I display a user's roles in Thymeleaf page, using code…
1
vote
1 answer

Thymeleaf: Do you need to use th:field *{} on all fields?

After adding a Model attribute in the @GetMapping do you need add all fields using th:field="*{...}" in the view's form? For example, if I add a User to the model and I want a form that edits the name but not the DOB or anything else can I just use…
1
vote
1 answer

Thymeleaf template crashing when trying to insert data from the server in the html file

I am trying to set up a java Spring application that will receive data from a website and display it in a thymeleaf template. The data is received successfully and it is populating the object in my app with the appropriate results. However, when…
1
vote
0 answers

On a Spring reactive project how to trigger the change of a non-reactive value in a Thymeleaf template?

I'm in the process of learning Spring Webflux. I've created a little project which render a flux in a Thymeleaf template. This works well, but I would also like to display kind of a loader in the template while the data from the flux are…
Gilles
  • 36
  • 2
  • 8
1
vote
0 answers

populate multiple spring-boot thymeleaf forms from list of objects and submit one of these with single object

My goal is to populate html page with multiple similar forms from list of objects. each form with "submit to edit button". By submitting one of these forms I'd like to receive on controller the single object from that particular form my form object…
Ignat
  • 88
  • 6
1
vote
0 answers

Can't join @Controller and Thymeleaf view

At startup, the spring application works with view, but the html code is highlighted in red when it is written, respectively, it is not convenient to look for errors in html, here are photos and code of html and the…
1
vote
2 answers

Externalize favicon with Spring Boot and Thymeleaf

Externalize favicon with Spring Boot and Thymeleaf For unimportant reasons, I'm trying to source a favicon in my Spring Boot project from a directory not on the classpath. I'm able to load images or other assets that directory but the favicon for…
motopascyyy
  • 79
  • 10
1
vote
0 answers

Why doesn't background appear? Written in Thyemleaf

I'm writing a web-site in Java. HTML file: When I run is there is still no background. No css code…
Axion
  • 11
  • 2
1
vote
1 answer

Calling method A is forbidden for type B in Thymeleaf expressions

I have just upgraded web project to Spring 6, Spring Boot 3 GA, and now I deal with following Thymeleaf incompability. I am generating form select.