We are using backbone.paginator
;backgrid
;backgrid-filter
;backgrid-paginator
it works great we have small issue when trying sort - at server side mode
-the grid by one (or more) of its columns
For Server side with are using Spring
with org.springframework.data.web.PageableHandlerMethodArgumentResolver
When debugging the app it seems that the order
from client side does NOT get parsed well on spring side and it falls to the default value
Two questions:
- Does any one know what is the parameters that should be sent to
PageableHandlerMethodArgumentResolver
? - How can
Backbone.PageableCollection
can be tweak in order to achieve that?
Our Initialize Paginator Code
Backbone.PageableCollection.extend({
state : {
pageSize : 15,
firstPage : 0, /* Spring paging is 0-based */
},
mode : "server",
/**
* override default queryParams to fit spring pageable var names
*/
queryParams : {
pageSize:"size",
totalRecords:"totalElements",
sortKey:"sort",
order:"sort_order",
directions : { "-1": "asc", "1": "desc" }
},
})
P.S:
It seems that spring
expect to get the data
as array separated by comma
instead regular. any idea how to it with backbone.paginator
? or how to change spring to be able to parse paginator to support several of sorting parameters
.