after passing an object to html using Thymeleaf,crntroller, how do js click actions modify the value of the object passed in? Or how to pay this object to the js object? For example, how to write the onclick of the following code?
<ul class="nav nav-tabs">
<li role="presentation" th:class="${menu.active}?"active":""" th:each="menu:${menuList}"><a onclick="" th:text="${menu.name}"></a></li>
</ul>
controller is as follows:
List<Menu> menuList = new ArrayList<Menu>();
menuList.add(new Menu("", true));
menuList.add(new Menu("", false));
menuList.add(new Menu("", false));
menuList.add(new Menu("", false));
model.addAttribute("menuList", menuList);