Libraryless. Click here for Pure Java version (3236L/20K).
1 | sclass HTMLPaginator { |
2 | S startParam = "start"; |
3 | S baseLink; |
4 | int start, step = 50; |
5 | int max; // number of items in list |
6 | |
7 | void processParams(SS params) { |
8 | start = parseInt(mapGet(params, startParam)); |
9 | } |
10 | |
11 | S renderNav(O... _) { |
12 | ret pageNav2(baseLink, max, start, step, startParam, _); |
13 | } |
14 | |
15 | IntRange visibleRange() { |
16 | ret intRange(start, min(max, start+step)); |
17 | } |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1029828 |
Snippet name: | HTMLPaginator |
Eternal ID of this version: | #1029828/4 |
Text MD5: | 8dfb68e03baf5182bd90e1b392966e17 |
Transpilation MD5: | 524dccfec0432f00d8beadc9f2568f28 |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-09-21 10:39:46 |
Source code size: | 408 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 223 / 479 |
Version history: | 3 change(s) |
Referenced in: | [show references] |