Merge pull request #295 from litvinovg/individual_list_fix
Individual list calculation fix
This commit is contained in:
commit
a4bf5030da
1 changed files with 1 additions and 2 deletions
|
@ -250,8 +250,7 @@ public class IndividualListController extends FreemarkerHttpServlet {
|
||||||
}else if ( requiredPages > MAX_PAGES && selectedPage > requiredPages - MAX_PAGES ){
|
}else if ( requiredPages > MAX_PAGES && selectedPage > requiredPages - MAX_PAGES ){
|
||||||
//the selected page is in the end of the list
|
//the selected page is in the end of the list
|
||||||
int startPage = requiredPages - MAX_PAGES;
|
int startPage = requiredPages - MAX_PAGES;
|
||||||
double max = Math.ceil(size/pageSize);
|
for(int page = startPage; page <= requiredPages; page++ ){
|
||||||
for(int page = startPage; page <= max; page++ ){
|
|
||||||
records.add( new PageRecord( "page=" + page, Integer.toString(page), Integer.toString(page), selectedPage == page ) );
|
records.add( new PageRecord( "page=" + page, Integer.toString(page), Integer.toString(page), selectedPage == page ) );
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Add table
Reference in a new issue