I am new to thymeleaf and i try to loop over a ArrayList but it doesn't work for me .. some help please: this is my Html page:
<body>
<div class="row">
<table>
<tr th:each="data: mois">
<td class="text-center" th:text="${data}">data</td>
</tr>
</table>
</div>
</body>
this is My controller
@RequestMapping(value="/editePlanning", method= RequestMethod.GET)
public String editePlanning(Model model){
Psi psi = psiRepository.findOne((long) 1);
List<String> data = new ArrayList<String>();
for(int i=0;i<psi.getNombreMois();i++){
int val = psi.getMoisDebut()+i%12;
data.add(""+ val);
}
model.addAttribute("mois",data);
return "editePlanning";
}