Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
how to use variable key in thymeleaf expression in js side

since few days, i tried to avoid to put an harcoded list in my JS to display a list of header labels.

I have tested many stuff but do not manage to find the way to do it. In Html, if a put a list inside the model, the value is well interpreted by the tag th:text

<td th:each="header:${headerMemberLiaisonList}" th:text="#{'planner.table.header.'+ ${header}}">???planner.table.header</td>

The issue is that my list is not computed at this moment because it depends on the actions of the user in this view. So I try to move it in JS part.
But the same peace of code in js which should be [[#{'planner.table.header.'+headers[i]}]], is not interpreted because the value between brackets is read as string.

any idea?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!