Spring MVC passing ArrayList back to controller

前端 未结 4 1755
情书的邮戳
情书的邮戳 2020-12-31 16:02

I am new to Spring. I display a list with users. Every row has a checkbox for removing the users.

Controller:

@Controller
public class AdminControlle         


        
4条回答
  •  忘掉有多难
    2020-12-31 16:31

    Your ModelAttribute is empty as there is no form data binding happening from your jsp to your model attribute. Take a look at how Spring sample for binding collections "http://developer.ucsd.edu/develop/user-interface/building-a-form/form-binding-with-collections.html". This will help you to understand.

    Most of the Spring application typically uses form:input with "path" parameter to do data binding.

提交回复
热议问题