Hi,
Im using Spring to create a webapp and would like to implement serverSorting (as the first server option) in my kendoGrid.
The problem Im having is being able to read the "sort/group/filter/etc" data that is sent from the dataSource to by REST controller method.
This the URL being called by the browser:
http://localhost:8080/itd-boot-thymeleaf-demo/users?{%22sort%22:[{%22field%22:%22lastName%22,%22dir%22:%22asc%22}]}
This is my dataSource read atribute:
read: {
url:
"/itd-boot-thymeleaf-demo/users"
,
contentType:
"application/json"
,
dataType:
"json"
},
Here is my controller method:
@RequestMapping(method=RequestMethod.GET, produces=
"application/json"
)
@ResponseBody
public String getUsers() {
System.out.println(
"### Getting users JSON"
);
List<User> users = userService.getList();
return
User.toJsonArray(users);
}
What parameters should I add to "getUsers()" to map the request data so my method can read it?
I've tried to find examples of the serverSorting being used with MVC but haven't had any luck.
Please advise.
Thanks,
Grant