Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1029828 // HTMLPaginator

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3236L/20K).

sclass HTMLPaginator {
  S startParam = "start";
  S baseLink;
  int start, step = 50;
  int max; // number of items in list
  
  void processParams(SS params) {
    start = parseInt(mapGet(params, startParam));
  }
  
  S renderNav(O... _) {
    ret pageNav2(baseLink, max, start, step, startParam, _);
  }
  
  IntRange visibleRange() {
    ret intRange(start, min(max, start+step));
  }
}

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: 224 / 479
Version history: 3 change(s)
Referenced in: #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)