I have a little problem, I must return a different choice of a select into a td
using thymeleaf, I try the next sentence:
If you want to have only one element the option is to make multiple conditions. It is confusing a little bit but if you understanda the logic it is not a big deal.
Lets say you want to do something like this:
if(user.role.admin){
//add only class='text-success'
}else if(user.role.user){
//add only class='text-primary'
}else{
//add only class='text-warning'
}
The logic is if1 : 'text-success' ? if2 : 'text-primary' ? 'text-warning'
Very simple. But the syntax would be like this: