filter out value from enum in th:each

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

filter out value from enum in th:each

f.ex. if I need to filter out the value '3AC' from the Group enum, how ... can I do that? (I can do it with field operators in standard classes like: ${xyz}.?[xyz.name != '3AC'] ... but how can I do it with an enum.) I tried f.ex. ... but this doesn't work. Thanks a lot for any hint/help! Didier
didier
Hello, I'm currently learning java, with spring mvc and thymeleaf. In my Home @Controller I'm adding an attribute which contains values from my enum Group.class: model.addAttribute("groups", Group.values()); Here is the content of the enum Group.class public enum Group { ABC,1BC,2AB,3AC } In my thymeleaf template I would need to filter "out" one (or some) values from the th:each I'm doing, to iterate and create rows in a table:
Loading...