Questions tagged [spring-thymeleaf]

289 questions
0
votes
0 answers

How to dynamically loop a JSON file using Thymeleaf in Spring boot

I have a requirement wherein I need to iterate over a List of Maps i.e. List> grab the data from the list, and map it to a JSON file. Now the challenge is that I need to loop the data dynamically in the JSON file. Well, I do know…
nickgkd
  • 35
  • 7
0
votes
0 answers

Thymeleaf modal Variable in form action

I'm using the following code, modalAndView.addObject("country", countryFetchByIdResponseDto); modalAndView.addObject("SERVICE_RESPONSE", countryFetchByIdResponseDto); modalAndView.addObject("BACK_BUTTON_LINK",…
vvekselva
  • 803
  • 3
  • 17
  • 34
0
votes
1 answer

Thymeleaf: saving checkbox and textField data to nested object

I have a basic crud app with 2 entities Employee and Project, they are mapped to a database with a ManyToMany relationship table called employee_projects. I can create projects and employees and also once projects are created they appear as a…
0
votes
0 answers

Thymeleaf Nested Modal Variables

I'm using Spring Thymeleaf for templating. I want to use the nested modal varabiles, but when I use it in nested form. I'm getting the follwing error, th:text=${${FIELD_NAME_1}} SpelParseException: EL1041E: After parsing a valid expression, there is…
vvekselva
  • 803
  • 3
  • 17
  • 34
0
votes
0 answers

Pull data in thymeleaf template using loop rather than pulling data for each data cell

I have this thymeleaf template and its an email template : https://jsfiddle.net/7dj1ekv8/ Data from the database that I am able to pull successfully using spring data JPA: I am pulling data from oracle database using below code. I then 'setProps'…
jane
  • 211
  • 9
  • 30
0
votes
0 answers

Spring Thymeleafs Template Engine error during template parsing

I can see there are a few question already asked in there, but still I can't find any solution to fix my issue. I am using Spring boot Thymeleafs Template Engine to parse value attribute with Spring Context. Then, I can process PDF generated with…
11Strong
  • 129
  • 6
0
votes
2 answers

Using Enum in sec:authorize="hasRole(...)" (Spring Boot and Thymeleaf)

I try to replace
by
but it does not work. Then I tried
0
votes
1 answer

Use ThymeLeaf to create multiple text input boxes

I want there to be four text input boxes for each of the 3 attributes called email, phone number, and service provider. Each input should be stored in a different ArrayList object's email, phone number, and service provider attribute. I think…
0
votes
1 answer

Thymeleaf: Check if message with dynamic key is null or empty

the key for the messages.properties lookup are provided by my Java Class, as you can see here (where i is a variable in a th:each loop): th:text="#{${i.nameKey}}" public String getNameKey() { // getKeyPrefix() generates a unique name from the…
INJG
  • 71
  • 7
0
votes
0 answers

Thymeleaf templateResolver WebApplicationContext throw nullpointexception

When I use thymeleaf in SpringMVC,the ServletContext throw nullpointexception ,here my code and trace stack @Configuration public class ViewResolverConfig { @Bean public ITemplateResolver templateResolver() { WebApplicationContext…
hush
  • 1
  • 3
0
votes
1 answer

How to generate static files from a Spring Thymeleaf project?

I have a website that was built using Spring Thymeleaf, and I'd like to generate the files, such as an index.html, css, and js files, in a flat directory so that I can serve the compiled/transpiled files from an AWS S3 bucket. The project is a…
0
votes
2 answers

Java Spring Boot/Thymeleaf redirectAttribute addFlashAttribute message NOT showing in redirect page

Can't seem to get addFlashAttribute message to display. It works on another controller but not on this one. My error check (if (!ingredientRepository...)) appears to work and the object is NOT saved due to error; however, the message is either not…
0
votes
1 answer

Thymeleaf form submit with model having associations

The application is web-application using spring boot and thymeleaf. The application has a questionnaire along with some fields that needs to filled to submit the form. The model object (here answeredQuestionnaire) in template…