当前位置: 首页>>代码示例>>Java>>正文


Java PortletURL.setParameter方法代码示例

本文整理汇总了Java中javax.portlet.PortletURL.setParameter方法的典型用法代码示例。如果您正苦于以下问题:Java PortletURL.setParameter方法的具体用法?Java PortletURL.setParameter怎么用?Java PortletURL.setParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.portlet.PortletURL的用法示例。


在下文中一共展示了PortletURL.setParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateURLJsonObject

import javax.portlet.PortletURL; //导入方法依赖的package包/类
private JSONObject generateURLJsonObject(RenderResponse renderResponse)
	throws WindowStateException {

	JSONObject urlObject = JSONFactoryUtil.createJSONObject();

	PortletURL customerRegistrationsDetail = renderResponse.createRenderURL();
	customerRegistrationsDetail.setWindowState(LiferayWindowState.EXCLUSIVE);
	customerRegistrationsDetail.setParameter(
		"mvcPath", "/templates/registrations_detail.ftl");

	urlObject.put("registrations_detail", customerRegistrationsDetail);

	PortletURL customerRegistrationsMenu = renderResponse.createRenderURL();
	customerRegistrationsMenu.setWindowState(LiferayWindowState.EXCLUSIVE);
	customerRegistrationsMenu.setParameter(
		"mvcPath", "/templates/registrations_menu.ftl");

	urlObject.put("registrations_menu", customerRegistrationsMenu);

	return urlObject;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:22,代码来源:FrontendWebRegisterPortlet.java

示例2: add

import javax.portlet.PortletURL; //导入方法依赖的package包/类
public void add(
	ActionRequest actionRequest, ActionResponse actionResponse) {

	ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
		WebKeys.THEME_DISPLAY);

	int firstParameter = ParamUtil.getInteger(
		actionRequest, "firstParameter");
	int secondParameter = ParamUtil.getInteger(
		actionRequest, "secondParameter");

	int result = _sampleService.add(firstParameter, secondParameter);

	PortletURL portletURL = PortletURLFactoryUtil.create(
		actionRequest, "arquillian_sample_portlet", themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	portletURL.setParameter(
		"firstParameter", String.valueOf(firstParameter));
	portletURL.setParameter(
		"secondParameter", String.valueOf(secondParameter));
	portletURL.setParameter("result", String.valueOf(result));

	actionRequest.setAttribute(WebKeys.REDIRECT, portletURL.toString());
}
 
开发者ID:liferay-labs,项目名称:arquillian-liferay,代码行数:26,代码来源:SamplePortlet.java

示例3: update

import javax.portlet.PortletURL; //导入方法依赖的package包/类
public void update(ActionRequest actionRequest,ActionResponse actionResponse) throws Exception{
	
	LearningActivity learningActivity = LearningActivityLocalServiceUtil.getLearningActivity(ParamUtil.getLong(actionRequest, "actId"));
	
	Document document = SAXReaderUtil.read(learningActivity.getExtracontent());
	Element rootElement = document.getRootElement();
	
	Element firedDateElement = rootElement.element("firedDate");
	//if(firedDateElement==null){
		rootElement.addElement("firedDate").setText(_dateFormat.format(new Date()));
		learningActivity.setExtracontent(document.formattedString());
		LearningActivityLocalServiceUtil.updateLearningActivity(learningActivity);

		evaluate(learningActivity.getActId());
	//}
	
	PortletURL viewPortletURL = ((LiferayPortletResponse)actionResponse).createRenderURL();
	viewPortletURL.setParameter("jspPage","/html/evaluationtaskactivity/view.jsp"); 
	
	String returnToFullPageURL = actionRequest.getParameter("returnToFullPageURL");
	if(Validator.isNotNull(returnToFullPageURL)) {
		viewPortletURL.setParameter("returnToFullPageURL", returnToFullPageURL);
	}
	
   	actionResponse.sendRedirect(viewPortletURL.toString());
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:27,代码来源:EvaluationActivity.java

示例4: doGetSummary

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
protected Summary doGetSummary(Document document, Locale locale, String snippet, PortletURL portletURL) throws Exception {
	_log.debug("doGetSummary()");
	String title = document.get(Field.TITLE);
	String content = snippet;
	if (Validator.isNull(snippet)) {
		content = document.get(Field.DESCRIPTION);
		if (Validator.isNull(content)) {
			content = StringUtil.shorten(document.get(Field.DESCRIPTION), 200);
		}
	}
       String resourcePrimKey = document.get(Field.ENTRY_CLASS_PK);

       portletURL.setParameter("jspPage", "/devel/view.jsp");
       portletURL.setParameter("resourcePrimKey", resourcePrimKey);

       return new Summary(title, content, portletURL);
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:19,代码来源:ApplicationIndexer.java

示例5: getURLViewInContext

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public final String getURLViewInContext(
		LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse,
		String noSuchEntryRedirect) throws Exception {
	ThemeDisplay themeDisplay = (ThemeDisplay) liferayPortletRequest.getAttribute(WebKeys.THEME_DISPLAY);
	PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(_layout.getPlid(), _portletId, PortletRequest.RENDER_PHASE);
	portletURL.setParameter("actId",Long.toString( _learningactivity.getActId()));
	portletURL.setParameter("moduleId",Long.toString( _learningactivity.getModuleId()));
	portletURL.setParameter("actionEditingActivity", StringPool.FALSE);
	portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
	portletURL.setParameter("actionEditingModule", StringPool.FALSE);
	portletURL.setParameter("actionCalifications", StringPool.FALSE);
	portletURL.setParameter("activityStarted", StringPool.TRUE);		
	
	String mvcPath = getMvcPathView(themeDisplay.getUserId(),liferayPortletResponse,liferayPortletRequest.getWindowState());
	if(Validator.isNotNull(mvcPath)){
		portletURL.setParameter("mvcPath",mvcPath);
	}
	
	prepareRuntimePortlet(portletURL);
	return portletURL.toString();
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:24,代码来源:LearningActivityBaseAssetRenderer.java

示例6: doEdit

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException {

  response.setContentType("text/html");

  PortletPreferences prefs = request.getPreferences();
  Map<String, String[]> map = prefs.getMap();
  Map<String, String> prefsMap = new HashMap<>();
  for (String key : map.keySet()) {
    String[] prefValue = map.get(key);
    prefsMap.put(key, prefValue == null || prefValue[0] == null ? "" : prefValue[0]);
  }
  request.setAttribute("prefs", prefsMap);

  PortletURL editPrefsURL = response.createActionURL();
  editPrefsURL.setParameter("action", "editPrefs");
  request.setAttribute("actionURL", editPrefsURL.toString());

  forward(editJsp, request, response);
}
 
开发者ID:km-works,项目名称:reverse-web-proxy-portlet,代码行数:21,代码来源:ReverseProxyIFramePortlet.java

示例7: AlbumSearch

import javax.portlet.PortletURL; //导入方法依赖的package包/类
public AlbumSearch(
	PortletRequest portletRequest, int delta, PortletURL iteratorURL) {

	super(
		portletRequest, new AlbumDisplayTerms(portletRequest),
		new AlbumSearchTerms(portletRequest), DEFAULT_CUR_PARAM, delta,
		iteratorURL, headerNames, EMPTY_RESULTS_MESSAGE);

	AlbumDisplayTerms displayTerms = (AlbumDisplayTerms)getDisplayTerms();

	iteratorURL.setParameter(
		AlbumDisplayTerms.ARTIST, displayTerms.getTitle());
	iteratorURL.setParameter(
		AlbumDisplayTerms.TITLE, displayTerms.getTitle());
	iteratorURL.setParameter(
		AlbumDisplayTerms.YEAR, String.valueOf(displayTerms.getYear()));
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:18,代码来源:AlbumSearch.java

示例8: render

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {

   portletResp.setContentType("text/html");
   PrintWriter writer = portletResp.getWriter();
   writer.write("<h3>Event Companion Portlet </h3>\n");
   writer.write("<p>DispatcherTests_SPEC2_19_ForwardServletEvent_event</p>\n");

   String msg = (String) portletReq.getPortletSession().getAttribute(
         RESULT_ATTR_PREFIX + "DispatcherTests_SPEC2_19_ForwardServletEvent", APPLICATION_SCOPE);
   msg = (msg == null) ? "Not ready. click test case link." : msg;
   writer.write("<p>" + msg + "</p>\n");

   PortletURL rurl = portletResp.createRenderURL();
   rurl.setParameter("qparm2", "renderVal2");
   TestSetupLink tl1 = new TestSetupLink(V2DISPATCHERTESTS_SPEC2_19_FORWARDSERVLETEVENT_DISPATCH2, rurl);
   tl1.writeTo(writer);

}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:20,代码来源:DispatcherTests_SPEC2_19_ForwardServletEvent_event.java

示例9: getURLEdit

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public PortletURL getURLEdit(
		LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse)
	throws Exception {

	PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(
		getControlPanelPlid(liferayPortletRequest),
		ArtistsPortlet.PORTLET_ID, PortletRequest.RENDER_PHASE);

	portletURL.setParameter("jspPage", "/html/artists/edit_artist.jsp");
	portletURL.setParameter(
		"artistId", String.valueOf(_artist.getArtistId()));

	return portletURL;
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:17,代码来源:ArtistAssetRenderer.java

示例10: render

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public void render(
	RenderRequest renderRequest, RenderResponse renderResponse)
	throws IOException, PortletException {

	ThemeDisplay themeDisplay =
		(ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
	PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();
	String portletId = portletDisplay.getId();

	JSONObject urlObject = JSONFactoryUtil.createJSONObject();
	JSONObject apiObject = JSONFactoryUtil.createJSONObject();

	// url
	PortletURL dossierInfoURL = PortletURLFactoryUtil.create(
		renderRequest, portletId, themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	dossierInfoURL.setPortletMode(PortletMode.VIEW);
	dossierInfoURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	dossierInfoURL.setParameter(
		"mvcPath", "/templates/lookup_dossier/dossierinfo.ftl");

	urlObject.put("dossierinfo", dossierInfoURL.toString());

	// api
	apiObject.put("server", themeDisplay.getPortalURL() + "/o/rest/v2");
	apiObject.put(
		"portletNamespace",
		themeDisplay.getPortletDisplay().getNamespace());

	// set varible
	renderRequest.setAttribute("ajax", urlObject);
	renderRequest.setAttribute("api", apiObject);

	super.render(renderRequest, renderResponse);

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:39,代码来源:LookupDossierResult.java

示例11: render

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public void render(
	RenderRequest renderRequest, RenderResponse renderResponse)
	throws IOException, PortletException {

	ThemeDisplay themeDisplay =
		(ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
	PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();
	String portletId = portletDisplay.getId();

	JSONObject urlObject = JSONFactoryUtil.createJSONObject();
	JSONObject apiObject = JSONFactoryUtil.createJSONObject();

	// url
	PortletURL registerResultURL = PortletURLFactoryUtil.create(
		renderRequest, portletId, themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	registerResultURL.setPortletMode(PortletMode.VIEW);
	registerResultURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	registerResultURL.setParameter(
		"mvcPath", "/templates/applicant/register_result.ftl");

	urlObject.put("register_result", registerResultURL.toString());

	// api
	apiObject.put("server", themeDisplay.getPortalURL() + "/o/rest/v2");
	apiObject.put(
		"portletNamespace",
		themeDisplay.getPortletDisplay().getNamespace());

	// set varible
	renderRequest.setAttribute("ajax", urlObject);
	renderRequest.setAttribute("api", apiObject);

	super.render(renderRequest, renderResponse);

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:39,代码来源:RegisterPorltet.java

示例12: render

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public void render(
	RenderRequest renderRequest, RenderResponse renderResponse)
	throws IOException, PortletException {

	ThemeDisplay themeDisplay =
		(ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
	PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();
	String portletId = portletDisplay.getId();

	JSONObject urlObject = JSONFactoryUtil.createJSONObject();
	JSONObject apiObject = JSONFactoryUtil.createJSONObject();

	// url
	PortletURL confirmPasswordURL = PortletURLFactoryUtil.create(
		renderRequest, portletId, themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	confirmPasswordURL.setPortletMode(PortletMode.VIEW);
	confirmPasswordURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	confirmPasswordURL.setParameter(
		"mvcPath", "/templates/applicant/confirm_password.ftl");

	urlObject.put("confirm_password", confirmPasswordURL.toString());

	// api
	apiObject.put("server", themeDisplay.getPortalURL() + "/o/rest/v2");
	apiObject.put(
		"portletNamespace",
		themeDisplay.getPortletDisplay().getNamespace());

	// set varible
	renderRequest.setAttribute("ajax", urlObject);
	renderRequest.setAttribute("api", apiObject);

	super.render(renderRequest, renderResponse);

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:39,代码来源:ForgottenAccount.java

示例13: render

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public void render(
	RenderRequest renderRequest, RenderResponse renderResponse)
	throws IOException, PortletException {

	ThemeDisplay themeDisplay =
		(ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
	PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();
	String portletId = portletDisplay.getId();

	JSONObject urlObject = JSONFactoryUtil.createJSONObject();
	JSONObject apiObject = JSONFactoryUtil.createJSONObject();

	// url
	PortletURL serviceInfoLookupURL = PortletURLFactoryUtil.create(
		renderRequest, portletId, themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	serviceInfoLookupURL.setPortletMode(PortletMode.VIEW);
	serviceInfoLookupURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	serviceInfoLookupURL.setParameter(
		"mvcPath", "/templates/homepage/serviceinfo_lookup.ftl");

	urlObject.put("serviceinfo_lookup", serviceInfoLookupURL.toString());

	// api
	apiObject.put("server", themeDisplay.getPortalURL() + "/o/rest/v2");
	apiObject.put(
		"portletNamespace",
		themeDisplay.getPortletDisplay().getNamespace());

	// set varible
	renderRequest.setAttribute("ajax", urlObject);
	renderRequest.setAttribute("api", apiObject);

	super.render(renderRequest, renderResponse);

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:39,代码来源:ServiceInfoLookup.java

示例14: render

import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public void render(
	RenderRequest renderRequest, RenderResponse renderResponse)
	throws IOException, PortletException {

	ThemeDisplay themeDisplay =
		(ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
	PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();
	String portletId = portletDisplay.getId();

	JSONObject urlObject = JSONFactoryUtil.createJSONObject();
	JSONObject apiObject = JSONFactoryUtil.createJSONObject();

	// url
	PortletURL dossierLookupURL = PortletURLFactoryUtil.create(
		renderRequest, portletId, themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	dossierLookupURL.setPortletMode(PortletMode.VIEW);
	dossierLookupURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	dossierLookupURL.setParameter(
		"mvcPath", "/templates/homepage/dossier_lookup.ftl");

	urlObject.put("dossier_lookup", dossierLookupURL.toString());

	// api
	apiObject.put("server", themeDisplay.getPortalURL() + "/o/rest/v2");
	apiObject.put(
		"portletNamespace",
		themeDisplay.getPortletDisplay().getNamespace());

	// set varible
	renderRequest.setAttribute("ajax", urlObject);
	renderRequest.setAttribute("api", apiObject);

	super.render(renderRequest, renderResponse);

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:39,代码来源:DossierLookup.java

示例15: render

import javax.portlet.PortletURL; //导入方法依赖的package包/类
public void render(RenderRequest renderRequest, RenderResponse renderResponse)
		throws IOException, PortletException {

	ThemeDisplay themeDisplay = (ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
	PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();
	String portletId = portletDisplay.getId();

	JSONObject urlObject = JSONFactoryUtil.createJSONObject();
	JSONObject apiObject = JSONFactoryUtil.createJSONObject();

	// url
	PortletURL dossierLookupURL = PortletURLFactoryUtil.create(renderRequest, portletId, themeDisplay.getPlid(),
			PortletRequest.RENDER_PHASE);

	dossierLookupURL.setPortletMode(PortletMode.VIEW);
	dossierLookupURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	dossierLookupURL.setParameter("mvcPath", "/templates/homepage/search_serviceinfo.ftl");

	urlObject.put("dossier_lookup", dossierLookupURL.toString());

	// api
	apiObject.put("server", themeDisplay.getPortalURL() + "/o/rest/v2");
	apiObject.put("portletNamespace", themeDisplay.getPortletDisplay().getNamespace());

	// set varible
	renderRequest.setAttribute("ajax", urlObject);
	renderRequest.setAttribute("api", apiObject);

	super.render(renderRequest, renderResponse);

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:ServiceSearchPortlet.java


注:本文中的javax.portlet.PortletURL.setParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。