阅读背景:

我们如何在spring mvc中将对象从视图传递给控制器?

来源:互联网 

Controller 1:

@RequestMapping(value = "/allEmployees", method = RequestMethod.GET)
public String getAllEmployees(@ModelAttribute("employeeListForm") EmployeeListForm employeeListForm, HttpServletRequest request, HttpServletResponse response, Model model, BindingResult errors) throws Exception {
    List<Employee> subList = null;
    allEmployees = empService.getAllEmployees(categoryId);      
    employeeListForm.setAllEmployees("allEmployees");           
    employeeListForm.setCategory("IT");         
    model.addAttribute("etcSearchForm", etcSearchForm); 
    return ALL_EMP_VIEW;
}
@RequestMapping(value = "/allEm



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: