spring3MVC下 jqgrid返回的默认查询参数需要添加required=false

@RequestMapping(method = RequestMethod.GET)
	public @ResponseBody
	CustomUserResponse getAll(
			@RequestParam("page") String page,
			@RequestParam("rows") String rows,
			@RequestParam("sidx") String sidx,
			@RequestParam("sord") String sord
			,@RequestParam("isSearch") Boolean isSearch
			,@RequestParam(value="searchField",required=false) String searchField
			,@RequestParam(value="searchOper",required=false) String searchOper
			,@RequestParam(value="searchString",required=false) String searchString
			,@RequestParam(value="filters",required=false) String filters
	){

........
}


后4个参数需要添加required=false,因为jqgrid在无查询添加时,是不会返回后4个参数的.

你可能感兴趣的:(Spring3)