What problem does it solve?
This skill removes the repetitive and error-prone work of implementing server-side pagination in ColdBox/BoxLang applications, ensuring consistent page calculations, offsets, and API pagination metadata across handlers and views.
Core Features & Use Cases
- Paginator service integration: Injection-ready Pagination service to create pagination objects and shorthand paginate() helper for quick usage.
- QueryBuilder and QB support: Works with QB QueryBuilder to run count queries, apply limit/offset, and return pageable collections.
- API and view support: Produces consistent pagination metadata for JSON APIs and renders page navigation for Bootstrap/Tailwind views.
- Best-practice patterns: Encourages validating page/per_page, capping maxRows, clamping page ranges, and returning standardized { data: [], pagination: {} } responses.
Quick Start
Use cbpaginator to paginate a users listing and return a JSON response with data and pagination metadata based on rc.page and rc.perPage.