Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

254
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda