Questions tagged [spring-thymeleaf]
289 questions
0
votes
1 answer
Number.format calculation with map
I am trying to show the number minus 20%. The number is in a map and I am not ale to get the value from there.
This is not working:

sjs
- 35
- 1
- 6
0
votes
1 answer
Can't load static resource with Thymeleaf
In my multi-module spring boot project I have included thymeleaf in the bo_ui module to show html pages.
Below what has been done so far.
MVC configuration class:
@Configuration
@EnableWebMvc
@ComponentScan({ "com.cmw.bo.console" })
/**
* Java…

user3187960
- 295
- 2
- 14
0
votes
1 answer
thymeleaf - sum of objects in list inside a list
I use spring boot + thymeleaf and mySQL DB
I have 3 entities:
Category
SubCategory
Porducts
The current table
I would like to show the sum of products in the table
This is the code to show the sum of sub category:

Bendi
- 3
- 1
0
votes
0 answers
Why is there nothing in my userConsul model
When I submit the form I want to collect the userConsult information. I then call my repository and call the Insert method. inside the brackets I include e.g.
userRepo.insertoIntoDB(userConsult.getepidemiology);
(I have left the other get methods as…

joshiscamp
- 1
- 1
0
votes
1 answer
How to take the time from Java Thymeleaf and send it to the controller? What is the type of parameter?
I am new to Java spring and I am learning how to make reservations. I have assignment to make a web application that helps clients to make reservation in certain coffee that they choose.
I have booking form where there is an input for date, time and…

StudentB
- 1
- 1
0
votes
0 answers
Spring Boot Thymeleaf Ajax GET
I need your help...
Primary controller :
@Controller
public class WaitingListController {
@Autowired
private WaitingListRepository waitingListRepo;
@Autowired
private DepartmentRepository depRepo;
@Autowired
private PatientRepository…

AdelLinux80s
- 21
- 7
0
votes
1 answer
Thymeleaf form bind object
I am trying to bind attributes that I get from calling controller in thymeleaf template to form and pass it as param in save method. here is my code:
@GetMapping("/alert/{id}")
public String getForm(Model model, @PathVariable(required = false, name…

juggernaut
- 126
- 18
0
votes
1 answer
Spring Boot Application: Failing to instantiate service class, NullPointerException
I'm having an issue where I'm unable to run a fairly simple spring boot application running off a H2 database.
The application is for allowing users to search for beers from a database using their name or ID, and be returned a paginated list based…

SerpentSeraphim666
- 11
- 2
0
votes
1 answer
Why internalization is not working with JHIpster Microservices application
I developed one spring boot microservice application using jhipster
tool and we have one quotation.html form it contains name and details
of the product I am trying to apply langauage translations to the name
and details labels based user…

Shiva Rena
- 23
- 7
0
votes
0 answers
Append class dynamically on varying URI
I have a context path /userlist and using server side pagination which results in URI like this: http://localhost:8080/userlist/?pageSize=10&page=2.
I am trying to append class to this tag using Thymeleaf dynamically.

Ajay Kumar
- 2,906
- 3
- 23
- 46
0
votes
0 answers
Compare Dates with Springboot Thymeleaf
I try to compare two dates with format yyyy-MM-ddTHH:mm:ss in a thymeleaf template.
I am able to compare a date, when I try:
${#dates.createNow().before(#dates.createNow())} // =false - just as an example
But my case is a bit tricky. At first I…

Nixen85
- 1,253
- 8
- 24
0
votes
1 answer
Thymeleaf iterate map of maps to create table with rowspans
Assuming I have
Date occuranceDate; //Dates only have years, months, days
String eventOwner;
String eventData;
Sample Data:
12-01-2021 , John Doe, random event data 1
12-01-2021, Jane Doe, random event data 2
12-01-2021, Jane Doe, random event…

Wael Awada
- 1,506
- 3
- 18
- 31
0
votes
1 answer
Thymeleaf String comparison of requestUri and message.properties variable fails
I try to add a class to a navlink based on the given URI.
My code is like this:
I also tried
....…

bb8-droid
- 21
- 3
0
votes
0 answers
Model attribute inconsistent after form submission
I'm still trying to figure out what's happening on the backend here. Working with Spring Boot/Thymeleaf. I have a form template that updates a model attribute object on save. I'm trying to use the updated values on the backend, however it's…

faebie
- 3
- 2
0
votes
1 answer
Iterate over Entity attributes in view, Spring Boot JPA with thymeleaf
I'm using Spring Boot JPA with Thymeleaf, I'm dealing with a Class (Entity) linked to a table with around 40 columns, so my entity model class has around 40 attributes (each one linked to each column of the table).
If I want to show in a view (using…

LuisGan
- 33
- 7