Questions tagged [spring-thymeleaf]

289 questions
0
votes
0 answers

org.thymeleaf.exceptions.TemplateInputException

customers.html is not rendering. enter image description here My Controller Class enter image description here My Model Class enter image description here Error Logs enter image description here Can someone please suggest me what is needed to be…
0
votes
1 answer

Not Showing error in field of model object in Thymeleaf page

Thymeleaf method fields.errors() which is to collect all validation, is not showing errors in html pages, and gives error i have tried all the methods to capture the error. also tried the article Main Error : "Neither BindingResult nor plain target…
0
votes
1 answer

Can not hide elements

I am using these in my pom: org.springframework.boot spring-boot-starter-security
Ajay Kumar
  • 2,906
  • 3
  • 23
  • 46
0
votes
1 answer

How can I get the information that I already put in H2 Database to thymeleaf page?

Client.java package com.example.demo.entities; import java.io.Serializable; import java.util.Collection; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import…
0
votes
0 answers

Can't load variable image with spring boot thymeleaf

I'm very new to spring boot, and I have to do a proyect with Thymeleaf. I can't figure out how to load the variable images from my folders.
0
votes
0 answers

comparator and conditional in Thymeleaf in one expression

trying to compare object to Enum and then to display proper result. I have Enum: public enum GameStatus { NOTPLAYED("notPlayedGame"), PLAYED("playedGame"); private final String gameStatus; GameStatus(String gameStatus) { …
k1313
  • 11
  • 4
0
votes
1 answer

Getting a NumberFormatException with thymeleaf on th:field but not on others th:*

I'm rather new to Thymeleaf, so this maybe a newbie mistake. And I've been looking everywhere online for an answer and haven't found one. So sorry if this is really basic. Basically I'm using Thymeleaf with SpringBoot 2.6.7 and I want to populate a…
0
votes
1 answer

Can Thymeleaf convert a String object to a ('2023-07-01') to date.formate so it looks like 01 Jan 2023?

I feel this would have been answered already (sorry) but I cant seem to work out what Im doing wrong. So I have a spring crud app and my date is a String, not a date object, and is shown as 2023-07-01 in my table, all good. Now is there an easy way…
0
votes
0 answers

A form in my Spring MVC app that submits a POST request is not returning the value entered

This is a basic Spring MVC application that stores the Group Stage Records for the World Cup just past. I have created the entity named GroupStageRecord that has variables homeTeam, awayTeam, homeResult, etc. I want users to be able to add a record…
0
votes
1 answer

Write value from Select in DTO Thymeleaf

I have an Entity "User". I have an Enum "Usertyp". Users have a field "usertyp". I want to change the "Usertyp" by passing a DTO to my controller. The problem is that the usertype gets changed to Null in the DB Another minor problem is that I want…
0
votes
1 answer

how to set selected value in drop down menu depending on conditions

I have code with drop down menu. The object for this menu has few fields. Two of them are playerPosition and isFirstSquadPlayer. If isFirstSquadPlayer is TRUE I need to display in menu player.playerPosition. Trying on few ways but failed. My…
k1313
  • 11
  • 4
0
votes
1 answer

Use javascript function in th:if for filtering some table entities

I want to hide the table rows that do not satisfy a date condition written in javascript function. the th:onclick attribute is working fine and returns me the correct comparison. But when I run the same in th:if the function is not called! the…
0
votes
0 answers

Validation in Thymeleaf + Spring. Using validation in registration stops displaying the html page

Faced with such a problem that when using in pom.xml spring-boot-starter-validation stops displaying the html page with registration. Without this, Thymeleaf works correctly. I searched through all the forums, and did not find the…
Alice
  • 1
  • 1
0
votes
1 answer

Using spring controller to provide list to html and make a drop down menu

I've created a controller to pass a list of pojo objects to the html. This seems to be working as when I refer to the list the IDE finds it. However, when I refer to a field within an element of the list it cannot find it and, instead of returning…
Hywel Griffiths
  • 287
  • 5
  • 16
0
votes
0 answers

Cannot resolve fields declared in my Model in my view. Using thymleaf+Springboot+IntelliJ

So I am working on a small project (I'm a newbie) and I have been unable to access my fields declared in my model class from my view in Thymeleaf. I checked the documentation and I am certain I am doing everything as it should be but for some…