{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1733","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1733/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1733/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1733/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/1733","id":95271210,"number":1733,"title":"JHipster - support for Pagination abstraction instead of request parameters","user":{"login":"pnowy","id":3254609,"avatar_url":"https://avatars.githubusercontent.com/u/3254609?v=3","gravatar_id":"","url":"https://api.github.com/users/pnowy","html_url":"https://github.com/pnowy","followers_url":"https://api.github.com/users/pnowy/followers","following_url":"https://api.github.com/users/pnowy/following{/other_user}","gists_url":"https://api.github.com/users/pnowy/gists{/gist_id}","starred_url":"https://api.github.com/users/pnowy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnowy/subscriptions","organizations_url":"https://api.github.com/users/pnowy/orgs","repos_url":"https://api.github.com/users/pnowy/repos","events_url":"https://api.github.com/users/pnowy/events{/privacy}","received_events_url":"https://api.github.com/users/pnowy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-15T19:26:40Z","updated_at":"2015-07-21T19:15:11Z","closed_at":null,"body":"I was wondering why on JHister parameters responsible for pagination are provided to back-end by specified request parameters (by @RequestParam annotation) instead of Pageable abstraction provided by PageableHandlerMethodArgumentResolver from Spring.\r\n\r\nI assumed that the problem was cooperation with default offset recognized from 0 by Spring and front-end implementation which uses the first page (offset) from 1.\r\n\r\nTo solve this issue and provide Pageable parameter support on the Resource classes we could prepare our own PageAndSortResolver which will recognize the pagination parameters. With this approach the users of JHipster could also easily use Spring sort abstraction out-of-the-box. Is it worth to consider?\r\n\r\nThe required changes you can see on the example [JHipster project](https://github.com/pnowy/jhipster-pagination) (commit: https://github.com/pnowy/jhipster-pagination/commit/5a8c748c225fc97a0e3a5a0c1787bd649dc2e550).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/123450055","html_url":"https://github.com/jhipster/generator-jhipster/issues/1733#issuecomment-123450055","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1733","id":123450055,"user":{"login":"pnowy","id":3254609,"avatar_url":"https://avatars.githubusercontent.com/u/3254609?v=3","gravatar_id":"","url":"https://api.github.com/users/pnowy","html_url":"https://github.com/pnowy","followers_url":"https://api.github.com/users/pnowy/followers","following_url":"https://api.github.com/users/pnowy/following{/other_user}","gists_url":"https://api.github.com/users/pnowy/gists{/gist_id}","starred_url":"https://api.github.com/users/pnowy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnowy/subscriptions","organizations_url":"https://api.github.com/users/pnowy/orgs","repos_url":"https://api.github.com/users/pnowy/repos","events_url":"https://api.github.com/users/pnowy/events{/privacy}","received_events_url":"https://api.github.com/users/pnowy/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T19:15:11Z","updated_at":"2015-07-21T19:15:11Z","body":"I've prepared the changes based on pure Spring pagination abstraction. (with pageable resolver provided with Spring) with required front-end changes (see https://github.com/pnowy/jhipster-pagination/commit/c0dcd7934d845fd64e93cd2a043d350f1764b3af). There is a less new code as before due the fact that we are using there class from Spring.\r\n\r\nThese changes are about the pagination. I will take a look also to pager and infinite scroll."}}