Make pagination example work for multiple controllers

This might come in handy when inheriting the paging functionality in multiple controllers.
Merge pull request #316 from gunnarblom/patch-1

Make pagination example work for multiple controllers