I am binding a list to field from thymleaf view, but getting null in the controller. Consider it is not null
in view.
<form th:object="${obj}"
<input type="hidden" th:field="*{someList}" th:value="${obj.getSomeList()}">
POJO is like this:
public class Foo {
private int id;
private List<Some> someList;
//setter getter
}
If I bind the id
in same way I am getting it in controller, pls help If I have take special care for List
.
My controller:
@RequestMapping
public String bar(@ModelAttribute("obj") Foo foo)