Questions tagged [spring-thymeleaf]

289 questions
0
votes
1 answer

Am I using script inlining and thymeleaf action wrong? Want to switch thymeleaf action path

A visual explanation of my code I built a Spring Boot Application and from the search bar, I'm trying to search based on SKU and Make separately by choosing the dropdown button as shown in the picture. By default the code is searching for SKUs with…
0
votes
2 answers

How to access data of spring model in another html page?

PlaceController.java @GetMapping("/places") public String listPlaces(Model model, HttpSession session) { //keys and values , access this key using thymeleaf syntax ${listPlaces} model.addAttribute("listPlaces",…
0
votes
1 answer

Make

appear and dissapear in Thymeleaf according to variable

Hello I am building an application in Spring Boot and Thymeleaf and I have a paragraph that I want to make it appear only if it has a value. If it does not I do not want it to appear. Here is the code that I have tried:

JohnNewman
  • 29
  • 1
  • 10

0
votes
1 answer

How to iterate and save 2 objects with thymeleaf?

I dont know how fix this error, i saw some articles about that but nothing works. Error Resolved [org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errorsField error in object 'pupil' on field…
0
votes
1 answer

How can I set a default value if a user doesn't send an input in Thymeleaf

Right now - I have a input field on my html that Thymeleaf sticks a '0' in when the page loads. If for some reason that '0' is erased and the form is submitted - I get a NumberFormatException. Is there a way I can automatically make it '0' if the…
Manning
  • 15
  • 4
0
votes
0 answers

Filtering results in Thymeleaf table SpringBoot app

Hello I have built a SpringBoot app with Thymeleaf on the front-end and I have a table that I must filter the results. Here is the code:
0
votes
1 answer

ITextRenderer - HTML to PDF conversion issue

All , I am using Thymleaf , ITextRenderer , Spring Boot to try to generate the PDF file. Input : JSON file Java Code: Reads the JSON file , process it to retrieve the information and save it in JavaObjects. The information will be displayed in the…
RagaSGNur
  • 199
  • 1
  • 2
  • 15
0
votes
0 answers

How can I append text in href tag of tag

I have an tag, which should have an href that contains text that needs to be appended. The below tag should be "href="open-job?123", here "123" is coming from a different source, the source is a thymeleaf object which is being populated from a…
0
votes
2 answers

Thymeleaf generates URL with no query parameters, but '?' appears

I'm working on a simple Spring Boot MVC application using Thymeleaf. Part of the thymeleaf code:
CIF BENEFICIAR
Andrei Manolache
  • 766
  • 1
  • 8
  • 17
0
votes
1 answer

Thymeleaf and html css with flying saucer doesn't work with packaged jar

I have a thymeleaf html template with custom css styling and a 'flying saucer' to produce the pdf and download from the GET REST endpoint. Here is the project folder structure of the project with template: When I run the Application class and use…
tyro
  • 577
  • 8
  • 17
0
votes
0 answers

Hi folks, Can someone help me with thymeleaf, how to get multiple object(say Address Object)?

I am using springboot 2.6.0 version, thymeleaf framework as view template and Spring MVC pattern. I have Profile object -> profile has list of address .I am confused how to get multiple address object from thymeleaf template. can someone help? Below…
Ripu Karn
  • 35
  • 6
0
votes
0 answers

Thymeleaf will not show values in table but shows correct number of rows

I have built an application in Spring and Thymeleaf and I have two input one for phone and one for email. The one for phone works very well and the one for email (when I search for an email) returns only the row names but without values, but with…
JohnNewman
  • 29
  • 1
  • 10
0
votes
1 answer

Showing input parameter on same page in Thymeleaf

I am trying to show the results on the same page as the form in Thymleaf and Spring and this is what I have tried till now: Controller: @Controller public class ThymeleafController { @GetMapping("/hello") public String getHello() { …
0
votes
2 answers

Thymeleaf - parameter in method is always null

I am new to thymeleaf and I have the following problem. I want to call a java method inside the html template but the method needs an argument but the issue is that no matter what I am passing for an argument the result is always…
shane_00
  • 101
  • 1
  • 2
  • 9
0
votes
1 answer

Convert jsp code to thymeleaf

I am working on a spring boot application and trying to convert jsp to thymeleaf. I am stuck converting the following jsp code to thymeleaf: I do not know how to convert the part.
Kurt Shaw
  • 609
  • 2
  • 10
  • 26