當前位置: 首頁>>代碼示例>>Java>>正文


Java WicketUtils.getPage方法代碼示例

本文整理匯總了Java中com.gitblit.wicket.WicketUtils.getPage方法的典型用法代碼示例。如果您正苦於以下問題:Java WicketUtils.getPage方法的具體用法?Java WicketUtils.getPage怎麽用?Java WicketUtils.getPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.gitblit.wicket.WicketUtils的用法示例。


在下文中一共展示了WicketUtils.getPage方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PushesPage

import com.gitblit.wicket.WicketUtils; //導入方法依賴的package包/類
public PushesPage(PageParameters params) {
	super(params);

	addSyndicationDiscoveryLink();

	int pageNumber = WicketUtils.getPage(params);
	int prevPage = Math.max(0, pageNumber - 1);
	int nextPage = pageNumber + 1;

	PushesPanel pushesPanel = new PushesPanel("pushesPanel", getRepositoryModel(), getRepository(), -1,
			pageNumber - 1, false);
	boolean hasMore = pushesPanel.hasMore();
	add(pushesPanel);

	add(new BookmarkablePageLink<Void>("firstPage", PushesPage.class,
			WicketUtils.newObjectParameter(repositoryName, objectId))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("prevPage", PushesPage.class,
			WicketUtils.newLogPageParameter(repositoryName, objectId, prevPage))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("nextPage", PushesPage.class,
			WicketUtils.newLogPageParameter(repositoryName, objectId, nextPage))
			.setEnabled(hasMore));
}
 
開發者ID:warpfork,項目名稱:gitblit,代碼行數:25,代碼來源:PushesPage.java

示例2: GitSearchPage

import com.gitblit.wicket.WicketUtils; //導入方法依賴的package包/類
public GitSearchPage(PageParameters params) {
	super(params);

	String value = WicketUtils.getSearchString(params);
	String type = WicketUtils.getSearchType(params);
	Constants.SearchType searchType = Constants.SearchType.forName(type);

	int pageNumber = WicketUtils.getPage(params);
	int prevPage = Math.max(0, pageNumber - 1);
	int nextPage = pageNumber + 1;

	SearchPanel search = new SearchPanel("searchPanel", repositoryName, objectId, value,
			searchType, getRepository(), -1, pageNumber - 1, getRepositoryModel().showRemoteBranches);
	boolean hasMore = search.hasMore();
	add(search);

	add(new BookmarkablePageLink<Void>("firstPageTop", GitSearchPage.class,
			WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("prevPageTop", GitSearchPage.class,
			WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType,
					prevPage)).setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("nextPageTop", GitSearchPage.class,
			WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType,
					nextPage)).setEnabled(hasMore));

	add(new BookmarkablePageLink<Void>("firstPageBottom", GitSearchPage.class,
			WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("prevPageBottom", GitSearchPage.class,
			WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType,
					prevPage)).setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("nextPageBottom", GitSearchPage.class,
			WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType,
					nextPage)).setEnabled(hasMore));

}
 
開發者ID:warpfork,項目名稱:gitblit,代碼行數:38,代碼來源:GitSearchPage.java

示例3: LogPage

import com.gitblit.wicket.WicketUtils; //導入方法依賴的package包/類
public LogPage(PageParameters params) {
	super(params);

	addSyndicationDiscoveryLink();

	int pageNumber = WicketUtils.getPage(params);
	int prevPage = Math.max(0, pageNumber - 1);
	int nextPage = pageNumber + 1;
	String refid = objectId;
	if (StringUtils.isEmpty(refid)) {
		refid = getRepositoryModel().HEAD;
	}
	LogPanel logPanel = new LogPanel("logPanel", repositoryName, refid, getRepository(), -1,
			pageNumber - 1, getRepositoryModel().showRemoteBranches);
	boolean hasMore = logPanel.hasMore();
	add(logPanel);

	add(new BookmarkablePageLink<Void>("firstPageTop", LogPage.class,
			WicketUtils.newObjectParameter(repositoryName, objectId))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("prevPageTop", LogPage.class,
			WicketUtils.newLogPageParameter(repositoryName, objectId, prevPage))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("nextPageTop", LogPage.class,
			WicketUtils.newLogPageParameter(repositoryName, objectId, nextPage))
			.setEnabled(hasMore));

	add(new BookmarkablePageLink<Void>("firstPageBottom", LogPage.class,
			WicketUtils.newObjectParameter(repositoryName, objectId))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("prevPageBottom", LogPage.class,
			WicketUtils.newLogPageParameter(repositoryName, objectId, prevPage))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("nextPageBottom", LogPage.class,
			WicketUtils.newLogPageParameter(repositoryName, objectId, nextPage))
			.setEnabled(hasMore));
}
 
開發者ID:warpfork,項目名稱:gitblit,代碼行數:38,代碼來源:LogPage.java

示例4: HistoryPage

import com.gitblit.wicket.WicketUtils; //導入方法依賴的package包/類
public HistoryPage(PageParameters params) {
	super(params);

	String path = WicketUtils.getPath(params);
	int pageNumber = WicketUtils.getPage(params);
	int prevPage = Math.max(0, pageNumber - 1);
	int nextPage = pageNumber + 1;

	HistoryPanel history = new HistoryPanel("historyPanel", repositoryName, objectId, path,
			getRepository(), -1, pageNumber - 1, getRepositoryModel().showRemoteBranches);
	boolean hasMore = history.hasMore();
	add(history);

	add(new BookmarkablePageLink<Void>("firstPageTop", HistoryPage.class,
			WicketUtils.newPathParameter(repositoryName, objectId, path))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("prevPageTop", HistoryPage.class,
			WicketUtils.newHistoryPageParameter(repositoryName, objectId, path, prevPage))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("nextPageTop", HistoryPage.class,
			WicketUtils.newHistoryPageParameter(repositoryName, objectId, path, nextPage))
			.setEnabled(hasMore));

	add(new BookmarkablePageLink<Void>("firstPageBottom", HistoryPage.class,
			WicketUtils.newPathParameter(repositoryName, objectId, path))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("prevPageBottom", HistoryPage.class,
			WicketUtils.newHistoryPageParameter(repositoryName, objectId, path, prevPage))
			.setEnabled(pageNumber > 1));
	add(new BookmarkablePageLink<Void>("nextPageBottom", HistoryPage.class,
			WicketUtils.newHistoryPageParameter(repositoryName, objectId, path, nextPage))
			.setEnabled(hasMore));

}
 
開發者ID:warpfork,項目名稱:gitblit,代碼行數:35,代碼來源:HistoryPage.java


注:本文中的com.gitblit.wicket.WicketUtils.getPage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。