Skip to content

Tag: thymeleaf

How to create a list of clickable items using Thymeleaf

In my Spring Boot web app, I need to create a list of items using Thymeleaf where clicking and submitting an item sends its value to my controller, which looks like this: Note the controller takes an item parameter. For comparison, this following Thymeleaf dropdown list performs as expected in that when I sel…

Template might not exists

Im trying to call restapi and im getting error org.thymeleaf.exceptions.TemplateInputException: Error resolving template [view-fields], template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:8…

Thymeleaf fragment processor and Spring 5

Could somebody, please, help with Thymeleaf? I need to create a template layout and I’ve got stuck with <div th:fragment=”content”></div>. The point is layout:fragment doesn’t replace code on the dashboard page. By the way, other processors like layout:decorate or th:replac…

Recieve a Map from a HTML form with Thymeleaf

I’m working on a project with Spring Web and Thymeleaf (this is my first time using Thymeleaf) and I have this requirement: The user needs to see a single form to fill a table with 32 rows and 4 columns, all at once. Edit. Each row has a fixed key (just for clarification) My first (naive) approach was t…

Populating inner table inside another table with Thymeleaf

I have DTO class: With getters, setters and toString for every field. I’m creating this table for shift schedule calendar: My Thymeleaf: The idea behind this: CalendarNode.date generates row for parent table, for each date. That works fine. Inside every row, in a cell I have second table that should sho…