本文整理匯總了Java中org.apache.wicket.request.mapper.parameter.PageParameters.add方法的典型用法代碼示例。如果您正苦於以下問題:Java PageParameters.add方法的具體用法?Java PageParameters.add怎麽用?Java PageParameters.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.request.mapper.parameter.PageParameters
的用法示例。
在下文中一共展示了PageParameters.add方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getUrlString
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
@Override
public String getUrlString(Class<? extends Page> pageClass, QueryFacetsSelection selection, SolrDocument document) {
final PageParameters params = new PageParameters();
if (selection != null) {
params.mergeWith(paramsConverter.toParameters(selection));
}
if (document != null) {
params.add(VloWebAppParameters.DOCUMENT_ID, document.getFirstValue(FacetConstants.FIELD_ID));
}
final String style = Session.get().getStyle();
if (style != null) {
params.add(VloWebAppParameters.THEME, style);
}
final CharSequence url = RequestCycle.get().urlFor(pageClass, params);
final String absoluteUrl = RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse(url));
return absoluteUrl;
}
示例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.userName != null)
params.add(PARAM_USER, state.userName);
if (state.unresolved)
params.add(PARAM_UNRESOLVED, "yes");
if (state.path != null)
params.add(PARAM_PATH, state.path);
if (state.before != null)
params.add(PARAM_BEFORE, state.before.getTime());
if (state.after != null)
params.add(PARAM_AFTER, state.after.getTime());
return params;
}
示例3: itemClick
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
private void itemClick(String link, Map<String, Object> object, AjaxRequestTarget target) {
String restId = (String) object.get("restId");
if ("Edit".equals(link)) {
PageParameters parameters = new PageParameters();
parameters.add("restId", restId);
setResponsePage(RestModifyPage.class, parameters);
return;
}
if ("Delete".equals(link)) {
JdbcTemplate jdbcTemplate = Spring.getBean(JdbcTemplate.class);
Map<String, Object> restRecord = jdbcTemplate.queryForMap("SELECT * FROM rest WHERE rest_id = ?", restId);
String groovyId = (String) restRecord.get("groovy_id");
if (!Strings.isNullOrEmpty(groovyId)) {
Map<String, Object> groovyRecord = jdbcTemplate.queryForMap("SELECT * FROM groovy WHERE groovy_id = ?", groovyId);
jdbcTemplate.update("DELETE FROM groovy WHERE groovy_id = ?", groovyId);
GroovyClassLoader classLoader = Spring.getBean(GroovyClassLoader.class);
classLoader.removeClassCache((String) groovyRecord.get("java_class"));
classLoader.removeSourceCache((String) groovyRecord.get("java_class"));
}
jdbcTemplate.update("DELETE FROM rest WHERE rest_id = ?", restId);
target.add(this.dataTable);
return;
}
}
示例4: ownerDetailsPerformed
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
private <F extends FocusType> void ownerDetailsPerformed(AjaxRequestTarget target, IModel<SelectableBean> model){
F focus = loadShadowOwner(model);
if(focus == null){
error(getString("PageAccounts.message.cantShowOwner"));
target.add(getFeedbackPanel());
return;
}
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, focus.getOid());
if (focus instanceof UserType){
navigateToNext(PageUser.class, parameters);
} else if (focus instanceof RoleType){
navigateToNext(PageRole.class, parameters);
} else if (focus instanceof OrgType) {
navigateToNext(PageOrgUnit.class, parameters);
} else {
error(getString("PageAccounts.message.unsupportedOwnerType"));
target.add(getFeedbackPanel());
return;
}
}
示例5: dispatchToObjectDetailsPage
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static void dispatchToObjectDetailsPage(Class<? extends ObjectType> objectClass, String oid, Component component, boolean failIfUnsupported) {
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, oid);
Class<? extends PageBase> page = getObjectDetailsPage(objectClass);
if (page != null) {
((PageBase) component.getPage()).navigateToNext(page, parameters);
} else if (failIfUnsupported) {
throw new SystemException("Cannot determine details page for "+objectClass);
}
}
示例6: handleSearch
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
protected void handleSearch() {
StatelessForm<Void> form = new StatelessForm<Void>("searchForm"){
@Override
protected void onSubmit() {
PageParameters parameters = new PageParameters();
parameters.add("search", search);
setResponsePage(SearchPage.class, parameters);
}
};
form.add(new TextField<Void>("search"));
add(form.setDefaultModel(new CompoundPropertyModel<ApplicationPageBase>(this)));
}
示例7: deleteAllIdentitiesConfirmed
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
private void deleteAllIdentitiesConfirmed(AjaxRequestTarget target, DeleteAllDto dto) {
Collection<SelectorOptions<GetOperationOptions>> options = new ArrayList<>();
GetOperationOptions opt = GetOperationOptions.createRaw();
options.add(SelectorOptions.create(ItemPath.EMPTY_PATH, opt));
OperationResult result = new OperationResult(OPERATION_LAXATIVE_DELETE);
String taskOid = null;
try {
if (dto.getDeleteUsers()) {
ObjectQuery query = createDeleteAllUsersQuery();
taskOid = deleteObjectsAsync(UserType.COMPLEX_TYPE, query, true, "Delete all users", result);
}
if (dto.getDeleteOrgs()) {
taskOid = deleteObjectsAsync(OrgType.COMPLEX_TYPE, null, true, "Delete all orgs", result);
}
if (dto.getDeleteAccountShadow()) {
taskOid = deleteAllShadowsConfirmed(result, true);
}
if (dto.getDeleteNonAccountShadow()) {
taskOid = deleteAllShadowsConfirmed(result, false);
}
} catch (Exception ex) {
result.computeStatus(getString("pageDebugList.message.laxativeProblem"));
LoggingUtils.logUnexpectedException(LOGGER, getString("pageDebugList.message.laxativeProblem"), ex);
}
if (taskOid != null) {
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, taskOid);
navigateToNext(PageTaskEdit.class, parameters);
} else {
navigateToNext(PageTasks.class);
}
target.add(getFeedbackPanel());
result.recomputeStatus();
showResult(result);
}
示例8: itemClick
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
private void itemClick(String link, Map<String, Object> object, AjaxRequestTarget target) {
DSLContext context = Spring.getBean(DSLContext.class);
System system = Spring.getBean(System.class);
FileTable fileTable = Tables.FILE.as("fileTable");
String fileId = (String) object.get("fileId");
FilePojo fileRecord = context.select(fileTable.fields()).from(fileTable).where(fileTable.FILE_ID.eq(fileId)).fetchOneInto(FilePojo.class);
Configuration configuration = system.getConfiguration();
if ("Delete".equals(link)) {
String repo = configuration.getString(Configuration.RESOURCE_REPO);
String path = fileRecord.getPath();
String name = fileRecord.getName();
File file = new File(repo, path + "/" + name);
FileUtils.deleteQuietly(file);
context.delete(fileTable).where(fileTable.FILE_ID.eq(fileId)).execute();
target.add(this.dataTable);
return;
}
if ("Edit".equals(link)) {
PageParameters parameters = new PageParameters();
parameters.add("fileId", fileId);
setResponsePage(FileModifyPage.class, parameters);
return;
}
if ("View".equals(link)) {
StringBuffer address = new StringBuffer();
address.append(getHttpAddress()).append("/api/resource").append(fileRecord.getPath()).append("/").append(fileRecord.getName());
RedirectPage page = new RedirectPage(address);
setResponsePage(page);
return;
}
}
示例9: accessGranted
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
@WithUserDetails("vinicius.nunes")
@Test
public void accessGranted() {
when(authorizationService.hasPermission(any(), any(), any(), any())).thenReturn(true);
tester = new SingularWicketTester(singularApplication);
PageParameters pageParameters = new PageParameters();
pageParameters.add(ACTION, FormAction.FORM_ANALYSIS.getId());
pageParameters.add(FORM_NAME, "foooooo.StypeFoo");
pageParameters.add(REQUIREMENT_DEFINITION_ID, requirementDefinitionEntity.getCod());
tester.startPage(DispatcherPage.class, pageParameters);
tester.assertRenderedPage(FormPage.class);
}
示例10: saveButtonOnSubmit
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
private void saveButtonOnSubmit(Button button) {
DocumentModifyRequest requestBody = new DocumentModifyRequest();
requestBody.setDocument(this.fields);
DocumentFunction.internalModifyDocument(this.collectionId, this.documentId, requestBody);
PageParameters parameters = new PageParameters();
parameters.add("collectionId", collectionId);
setResponsePage(DocumentBrowsePage.class, parameters);
}
示例11: resetPerformed
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
private void resetPerformed(AjaxRequestTarget target) {
int index = getTabPanel().getSelectedTab();
PageParameters params = new PageParameters();
params.add(SELECTED_TAB_INDEX, index);
PageSystemConfiguration page = new PageSystemConfiguration(params);
setResponsePage(page);
}
示例12: shadowDetailsPerformed
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
private void shadowDetailsPerformed(AjaxRequestTarget target, String accountName, String accountOid) {
if (StringUtils.isEmpty(accountOid)) {
error(pageBase.getString("pageContentAccounts.message.cantShowAccountDetails", accountName,
accountOid));
target.add(pageBase.getFeedbackPanel());
return;
}
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, accountOid);
getPageBase().navigateToNext(PageAccount.class, parameters);
}
示例13: PageMergeObjects
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public PageMergeObjects(F mergeObject, F mergeWithObject, Class<F> type){
this.mergeObject = mergeObject;
this.mergeWithObject = mergeWithObject;
this.type = type;
initModels();
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, mergeObject.getOid());
getPageParameters().overwriteWith(parameters);
initialize(this.mergeObject.asPrismObject());
}
示例14: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Project project, @Nullable String baseBranch) {
PageParameters params = paramsOf(project);
if (baseBranch != null)
params.add(PARAM_BASE, baseBranch);
return params;
}
示例15: paramsOf
import org.apache.wicket.request.mapper.parameter.PageParameters; //導入方法依賴的package包/類
public static PageParameters paramsOf(Group group) {
PageParameters params = new PageParameters();
params.add(PARAM_GROUP, group.getId());
return params;
}