本文整理匯總了Java中org.apache.wicket.request.mapper.parameter.PageParameters.set方法的典型用法代碼示例。如果您正苦於以下問題:Java PageParameters.set方法的具體用法?Java PageParameters.set怎麽用?Java PageParameters.set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.request.mapper.parameter.PageParameters
的用法示例。
在下文中一共展示了PageParameters.set方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, State state) {
PageParameters params = paramsOf(project);
params.set(PARAM_REVISION, state.revision);
if (state.compareWith != null)
params.set(PARAM_COMPARE_WITH, state.compareWith);
if (state.whitespaceOption != WhitespaceOption.DEFAULT)
params.set(PARAM_WHITESPACE_OPTION, state.whitespaceOption.name());
if (state.pathFilter != null)
params.set(PARAM_PATH_FILTER, state.pathFilter);
if (state.blameFile != null)
params.set(PARAM_BLAME_FILE, state.blameFile);
if (state.commentId != null)
params.set(PARAM_COMMENT, state.commentId);
if (state.mark != null)
params.set(PARAM_MARK, state.mark.toString());
return params;
}
示例2: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(PullRequest request, State state) {
PageParameters params = RequestDetailPage.paramsOf(request);
if (state.oldCommit != null)
params.set(PARAM_OLD_COMMIT, state.oldCommit);
if (state.newCommit != null)
params.set(PARAM_NEW_COMMIT, state.newCommit);
if (state.whitespaceOption != WhitespaceOption.DEFAULT)
params.set(PARAM_WHITESPACE_OPTION, state.whitespaceOption.name());
if (state.pathFilter != null)
params.set(PARAM_PATH_FILTER, state.pathFilter);
if (state.blameFile != null)
params.set(PARAM_BLAME_FILE, state.blameFile);
if (state.commentId != null)
params.set(PARAM_COMMENT, state.commentId);
if (state.mark != null)
params.set(PARAM_MARK, state.mark.toString());
return params;
}
示例3: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, State state) {
PageParameters params = paramsOf(project);
if (state.blobIdent.revision != null)
params.set(PARAM_REVISION, state.blobIdent.revision);
if (state.blobIdent.path != null)
params.set(PARAM_PATH, state.blobIdent.path);
if (state.mark != null)
params.set(PARAM_MARK, state.mark.toString());
if (state.requestId != null)
params.set(PARAM_REQUEST, state.requestId);
if (state.commentId != null)
params.set(PARAM_COMMENT, state.commentId);
if (state.mode != Mode.VIEW)
params.set(PARAM_MODE, state.mode.name().toLowerCase());
if (state.query != null)
params.set(PARAM_QUERY, state.query);
return params;
}
示例4: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, State state) {
PageParameters params = paramsOf(project);
params.set(PARAM_LEFT, state.leftSide.toString());
params.set(PARAM_RIGHT, state.rightSide.toString());
params.set(PARAM_COMPARE_WITH_MERGE_BASE, state.compareWithMergeBase);
if (state.whitespaceOption != WhitespaceOption.DEFAULT)
params.set(PARAM_WHITESPACE_OPTION, state.whitespaceOption.name());
if (state.pathFilter != null)
params.set(PARAM_PATH_FILTER, state.pathFilter);
if (state.blameFile != null)
params.set(PARAM_BLAME_FILE, state.blameFile);
if (state.mark != null)
params.set(PARAM_MARK, state.mark.toString());
if (state.tabPanel != null)
params.set(PARAM_TAB, state.tabPanel.name());
return params;
}
示例5: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, String revision, String format) {
PageParameters params = new PageParameters();
params.set(PARAM_DEPOT, project.getName());
params.set(PARAM_REVISION, revision);
params.set(PARAM_FORMAT, format);
return params;
}
示例6: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, BlobIdent blobIdent) {
PageParameters params = new PageParameters();
params.set(PARAM_DEPOT, project.getName());
params.set(PARAM_REVISION, blobIdent.revision);
params.set(PARAM_PATH, blobIdent.path);
return params;
}
示例7: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, String attachmentDirUUID, String attachmentName) {
PageParameters params = new PageParameters();
params.set(PARAM_DEPOT, project.getName());
params.set(PARAM_UUID, attachmentDirUUID);
params.set(PARAM_ATTACHMENT, attachmentName);
final File attachmentFile = new File(getAttachmentDir(project, attachmentDirUUID), attachmentName);
params.set("v", attachmentFile.lastModified());
return params;
}
示例8: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, State state) {
PageParameters params = paramsOf(project);
if (state.compareWith != null)
params.set(PARAM_COMPARE_WITH, state.compareWith);
if (state.query != null)
params.set(PARAM_QUERY, state.query);
if (state.page != 1)
params.set(PARAM_PAGE, state.page);
return params;
}
示例9: fillPageParams
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public void fillPageParams(PageParameters params) {
params.set(PARAM_STATUS, status.name());
if (submitterName != null)
params.set(PARAM_SUBMITTER, submitterName);
if (targetBranch != null)
params.set(PARAM_BRANCH, targetBranch);
if (title != null)
params.set(PARAM_TITLE, title);
if (beginDate != null)
params.set(PARAM_BEGIN_DATE, beginDate.getTime());
if (endDate != null)
params.set(PARAM_END_DATE, endDate.getTime());
}
示例10: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(PullRequest request, State state) {
PageParameters params = RequestDetailPage.paramsOf(request);
if (state.whitespaceOption != WhitespaceOption.DEFAULT)
params.set(PARAM_WHITESPACE_OPTION, state.whitespaceOption.name());
if (state.pathFilter != null)
params.set(PARAM_PATH_FILTER, state.pathFilter);
if (state.blameFile != null)
params.set(PARAM_BLAME_FILE, state.blameFile);
return params;
}
示例11: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, String revision, @Nullable String path) {
PageParameters params = new PageParameters();
params.set(PARAM_REPO, project.getId());
params.set(PARAM_REVISION, revision);
if (path != null)
params.set(PARAM_PATH, path);
return params;
}
示例12: populateItem
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
@Override
protected void populateItem(ListItem<ChampionMasteryItem> item) {
ChampionMasteryItem mastery = item.getModelObject();
ChampionStatisticItem championStatistic = null;
// create boolean to storing whether or not element should be shown
// set to false if mastery or championStatistic is null
boolean visible = true;
// check if mastery is null
if (mastery != null) {
championStatistic = PageDataProvider.getChampionStatisticById(mastery.getChampionId());
} else {
// if mastery is null create a new one and fill it with default data
mastery = new ChampionMasteryItem();
mastery.setChampionPoints(42);
mastery.setChampionLevel(1);
visible = false;
}
if (championStatistic == null) {
// if champion statistic is null use default champion for statistic
championStatistic = PageDataProvider.championStatisticMap.get("bard");
visible = false;
}
// create link to champion page
PageParameters linkParameters = new PageParameters();
linkParameters.set(0, championStatistic.getKeyName());
BookmarkablePageLink<String> link = new BookmarkablePageLink<>("champion_link",
SingleChampionPage.class, linkParameters);
item.add(link);
// add champion portrait, name and mastery score as well as champion level
link.add(new ExternalImage("champion_portrait", championStatistic.getPortraitUrl()));
link.add(new Label("champion_name", championStatistic.getChampionName()));
link.add(new Label("champion_stats", String.format("%s - Level %d", NumberFormatter.formatLong(
mastery.getChampionPoints()), mastery.getChampionLevel())));
// hide link if necessary
link.setVisible(visible);
}
示例13: updateBreadcrumbParameters
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public void updateBreadcrumbParameters(String key, Object value) {
List<Breadcrumb> list = getBreadcrumbs();
if (list.isEmpty()) {
return;
}
Breadcrumb bc = list.get(list.size() - 1);
PageParameters params = bc.getParameters();
if (params == null) {
return;
}
params.set(key, value);
}
示例14: setUp
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
@Before
public void setUp() {
tester = new WicketTester(application);
document = new SolrDocument();
document.setField(FacetConstants.FIELD_ID, "documentId");
params = new PageParameters();
params.set(VloWebAppParameters.DOCUMENT_ID, "documentId");
}
示例15: fillPageParams
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public void fillPageParams(PageParameters params) {
params.set(PARAM_ORDER_PROPERTY, propertyName);
params.set(PARAM_ORDER_ASCENDING, ascending);
}