Questions tagged [spring-thymeleaf]

289 questions
0
votes
0 answers

How do I get Thymeleaf to trigger client-side javascript to populate a table cell based on value in different cell same row

I have a table |sCode|stockingDate|purchasePrice|qtyRemaining|cost|offeringPrice|P/L| |:----|:----------:|:-----------:|:----------:|:--:|:-----------:|:-:| |G123 |2021-03-06 |2.57 |35 | *1 | *2 | *3| So when the Browser…
Quellist
  • 1
  • 2
0
votes
1 answer

Spring + Thymeleaf - Display multiple markers from database (Longitude and latitude)

I have written code to fetch data from the database displayed in a table. I want to fetch the longitude and latitude so I can display multiple markers via the Google Maps API. Currently I have a marker with a hardcoded longitude and latitude values.…
0
votes
1 answer

Why are my Thymeleaf Path variables breaking my HTML?

I have two similar controller methods that I'm using to test the @PathVariable annotation with: @RequestMapping( value = "/1", method = {RequestMethod.GET}) public String two(Model model) { …
old_dd
  • 135
  • 2
  • 13
0
votes
2 answers

Is there a simple way in thymeleaf to check if an image with @{} exists?

So, I am trying to make a shop section and I cannot find a way to display an alt image in case my image doesn't exist. Basically I use the Model to pass a List then with th:each I manage to make a card for each product. All images are called after…
0
votes
2 answers

SpringBoot does not detect template of Thymeleaf

I started learning Thymeleaf templating with SpringBoot and my learning path was blocked by some implicit issue i could not find.... The issue is: SpringBoot app does not see template, although: Controller looks like Project structure includes…
27P
  • 1,183
  • 16
  • 22
0
votes
1 answer

Spring Thymeleaf set checkbox to on update value with related table

Im trying to setup an update/edit page, for an Employee entity that has a oneToMany relation with EmployeeProject entity. Then Project also has a oneToMany relation to EmployeeProject. Saving an employee works fine, you enter a name and contract…
0
votes
1 answer
0
votes
0 answers

generation of a graphic chart using spring boot thymleaf

I have a problem with graphic chart generation in a pdf report , I'm creating a pdf report with simple data and I want to add a summary graphic chart using spring boot and thymleaf, the problem is that the part where I must have the graphic chart is…
0
votes
0 answers

Thymeleaf template not connecting correctly to Java POJO

I am following the Spring in Action (5th Edition) by Craig Walls, and I am stuck trying to figure out why the form element my Thymeleaf view isn't passing on the correct data type to my pojo object. Short of it is: When visiting…
0
votes
0 answers

Default option not getting select using select with thymeleaf

I have a spring boot application with frontend using thymeleaf and bootstrap. I have dropdown list on a questionnaire, which is populated with a list of options. But when I create a new questionnaire or I always get first option as selected of the…
0
votes
0 answers

Model attributes in Thymleaf and Spring boot

I'm wondering how I can receive the object from frontend(Thymeleaf) using @ModelAttribute. Main purpose of this is to edit object in the new view(html) where the fields are filled updated object therefore the invoice object is passed to model for…
0
votes
0 answers

My Spring Form with JQuery Not Sending Error but Saves Form

I'm using Spring MVC with Get & Post Mapping & also Thymeleaf on my HTML & I'm trying to make form validation but with JQuery. Right now I'm testing the validation with just the Store Name field first before the rest. Here's my HTML:
0
votes
1 answer

Thymeleaf custom dialect - nested attributes

I would like to ask if it is possible to have nested attributes in HTML tag which can reuse result of previous one. For example

where custom:one can be used standalone…

ketrab321
  • 541
  • 2
  • 12
  • 22
0
votes
2 answers

Property or field 'userName' cannot be found on null

here is the code:- form.html :
0
votes
1 answer

Post Object with nested List object in Spring-boot and Thymeleaf

Spring/Thymeleaf beginner sorry in advance but I have 2 entities Employee and MeetingInfo. Employee has a oneToMany relationship with MeetingInfo so basically an Employee can have many MessageInfo. Using psvm I can add a new Employee with multiple…