ray-dong / play--paginate Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nicogiard/play--paginate
Play! framework pagination module
This project forked from nicogiard/play--paginate
Play! framework pagination module
*Play--Paginate* Adds two new tags: #{paginate.list items:var, as:'ref'/}, which works as a drop-in replacement for #{list/} to show one page at a time and #{paginate.controls items:var /} to display the pagination controls Also, add <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/play-pagination.css'}"> if you want to use the default stylesheet. *Using Paginator from your Controllers* The paginator can be used in one of three ways: 1) You can wrap the entire result set. This is useful if the entire List is in memory already. List<Foo> values = ...; ValuePaginator entites = new ValuePaginator(values); render(entities); 2) You can wrap the keys. Paginator will lazily lookup the pages as they are rendered. List<Long> keys = ... "SELECT id FROM Foo" ... ; ModelPaginator entities = new ModelPaginator(Foo.class, keys); render(entities); 3) You can supply a Play! Model and optionally a filter and let the Paginator figure out the rest. ModelPaginator entities = new ModelPaginator(Foo.class, "foo=?", "bar"); render(entities); *Customization* Pagination controls are controlled by the view paginate/Controls.html and can be overridden in your project. If the row count summary option is enabled, you can also customize paginate/RowCountSummary.html to customize the footer (which, by default, displays the message: "Displaying rows X to Y out of Z records."). The following properties are available to customize pagination display: - get/setBoundaryControlsEnabled: determines whether the First and Last buttons are displayed - get/setPagesDisplayed: customizes the number of pages that show up between the forward/backward controls - get/setPageSize: determines the number of rows we display per page - get/setRowCountSummaryEnabled: determines whether the row count summary view template is displayed. By default, this area displays the message: "Displaying rows X to Y out of Z records." By default, paginator uses the "page" request parameter to determine what page you are viewing. If you would like to override that, you can add a "paginator.parameter.name" entry to your application.conf: paginator.parameter.name=__pagenumber
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.