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


Java PageParameters.add方法代碼示例

本文整理匯總了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;
}
 
開發者ID:acdh-oeaw,項目名稱:vlo-curation,代碼行數:21,代碼來源:PermalinkServiceImpl.java

示例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;
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:17,代碼來源:CodeCommentsPage.java

示例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;
    }
}
 
開發者ID:PkayJava,項目名稱:MBaaS,代碼行數:25,代碼來源:RestBrowsePage.java

示例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;
    }
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:25,代碼來源:PageAccounts.java

示例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);
	}
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:11,代碼來源:WebComponentUtil.java

示例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)));
}
 
開發者ID:UKPLab,項目名稱:coling2016-marketing-blunders,代碼行數:13,代碼來源:HomePage.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:39,代碼來源:PageDebugList.java

示例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;
    }
}
 
開發者ID:PkayJava,項目名稱:MBaaS,代碼行數:32,代碼來源:FileBrowsePage.java

示例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);
}
 
開發者ID:opensingular,項目名稱:singular-server,代碼行數:13,代碼來源:DispatcherPageTest.java

示例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);
}
 
開發者ID:PkayJava,項目名稱:MBaaS,代碼行數:11,代碼來源:DocumentModifyPage.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:9,代碼來源:PageSystemConfiguration.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:13,代碼來源:ResourceContentPanel.java

示例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());
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:13,代碼來源:PageMergeObjects.java

示例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;
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:7,代碼來源:ProjectBranchesPage.java

示例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;
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:6,代碼來源:GroupPage.java


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