pagerParams.put("repositories", StringUtils.flattenStrings(repositoriesModel.getObject()));\r
pagerParams.put("query", queryModel.getObject());\r
\r
+ boolean showPager = false;\r
int totalPages = 0;\r
if (results.size() > 0) {\r
totalPages = (results.get(0).totalHits / pageSize) + (results.get(0).totalHits % pageSize > 0 ? 1 : 0);\r
+ showPager = results.get(0).totalHits > pageSize;\r
}\r
\r
- add(new PagerPanel("topPager", page, totalPages, LuceneSearchPage.class, pagerParams));\r
- add(new PagerPanel("bottomPager", page, totalPages, LuceneSearchPage.class, pagerParams));\r
+ add(new PagerPanel("topPager", page, totalPages, LuceneSearchPage.class, pagerParams).setVisible(showPager));\r
+ add(new PagerPanel("bottomPager", page, totalPages, LuceneSearchPage.class, pagerParams).setVisible(showPager));\r
}\r
}\r