private String pagination(String baseUrl, int count) { HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest(); Pagination pagination = Utilities.buildPagination(request, null); StringBuffer output = new StringBuffer(); output.append(this.nextPage(pagination, baseUrl, count, true)); output.append(" | "); output.append(this.nextPage(pagination, baseUrl, count, false)); output.append("  ("); output.append(this.numResults(pagination, baseUrl)); output.append(")"); return output.toString(); }
private void view(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception { String virtualWiki = Utilities.getVirtualWikiFromURI(request); Pagination pagination = Utilities.buildPagination(request, next); WikiUser user = Utilities.currentUser(); if (!user.hasRole(Role.ROLE_USER)) { throw new WikiException(new WikiMessage("watchlist.error.loginrequired")); } Collection changes = WikiBase.getDataHandler().getWatchlist(virtualWiki, user.getUserId(), pagination); next.addObject("numChanges", new Integer(changes.size())); next.addObject("changes", changes); pageInfo.setPageTitle(new WikiMessage("watchlist.title")); pageInfo.setContentJsp(JSP_WATCHLIST); pageInfo.setSpecial(true); }