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


Java PortletURL.setPortletMode方法代码示例

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


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

示例1: EditPage

import javax.portlet.PortletURL; //导入方法依赖的package包/类
public EditPage() {

		// Obtém a página de visualização
		RenderResponse rRes = UIUtils.getRenderResponse();
		PortletURL pURL = rRes.createRenderURL();
		try {
			pURL.setPortletMode(PortletMode.VIEW);
		} catch (PortletModeException e) {
		}
		viewUrl = pURL.toString();

		PortletPreferences pp = UIUtils.getPortletPreferences();

		initFeedbackPanel();
		initForm();
		initMensagem(pp);
		initUrl(pp);
		initVoltar();
	}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:20,代码来源:EditPage.java

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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,代码行数:33,代码来源:DossierLookupPortlet.java

示例9: getPortletModeUrl

import javax.portlet.PortletURL; //导入方法依赖的package包/类
/**
 * Helper to get the URL to take us to a portlet mode.
 * This will end up in doDispatch.
 * 
 * @param response
 * @return
 */
private String getPortletModeUrl(RenderResponse response, PortletMode mode) {

	PortletURL url = response.createRenderURL();
    try {
    	url.setPortletMode(mode);
	} catch (PortletModeException e) {
		log.error("Invalid portlet mode: " + mode);
		return null;
	}
    
	return url.toString();
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:20,代码来源:SimpleRSSPortlet.java

示例10: buildViewUrl

import javax.portlet.PortletURL; //导入方法依赖的package包/类
/**
 * URL para redirecionar para visualização
 */
private void buildViewUrl() {
	RenderResponse rRes = UIUtils.getRenderResponse();
	PortletURL pURL = rRes.createRenderURL();
	try {
		pURL.setPortletMode(PortletMode.VIEW);
	} catch (PortletModeException e) {
	}
	viewUrl = pURL.toString();
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:13,代码来源:ConfiguracaoPage.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 serviceInfoListURL = PortletURLFactoryUtil.create(
		renderRequest, portletId, themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	serviceInfoListURL.setPortletMode(PortletMode.VIEW);
	serviceInfoListURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	serviceInfoListURL.setParameter(
		"mvcPath", "/templates/serviceinfo/serviceinfomain_list.ftl");

	PortletURL serviceinfoDetailURL = PortletURLFactoryUtil.create(
		renderRequest, portletId, themeDisplay.getPlid(),
		PortletRequest.RENDER_PHASE);

	serviceinfoDetailURL.setPortletMode(PortletMode.VIEW);
	serviceinfoDetailURL.setWindowState(LiferayWindowState.EXCLUSIVE);
	serviceinfoDetailURL.setParameter(
		"mvcPath", "/templates/serviceinfo/serviceinfo_detail.ftl");

	urlObject.put("serviceinfo_detail", serviceinfoDetailURL.toString());
	urlObject.put("serviceinfomain_list", serviceInfoListURL.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,代码行数:49,代码来源:ServiceInfoPortlet.java

示例12: render

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

   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

   PrintWriter writer = portletResp.getWriter();

   JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();

   // Create result objects for the tests

   /* TestCase: V2PortletTests_Portlet_ApiRender_init1                     */
   /* Details: "Method init(PortletConfig): is called for the portlet      */
   /* defined in the deployment descriptor"                                */
   TestResult tr0 = tcd.getTestResultFailed(V2PORTLETTESTS_PORTLET_APIRENDER_INIT1);
   String name=portletConfig.getPortletName();
   try {
      if(name.equals(this.getClass().getSimpleName()) && initCalled==true) 
 	       tr0.setTcSuccess(true);
   } catch(Exception e) {tr0.appendTcDetail(e.toString());}
   
   tr0.writeTo(writer);
   
   /* TestCase: V2PortletTests_Portlet_ApiRender_render1                   */
   /* Details: "Method render(RenderRequest, RenderResponse): is called    */
   /* when the portlet is to be rendered"                                  */
   TestResult tr1 = tcd.getTestResultFailed(V2PORTLETTESTS_PORTLET_APIRENDER_RENDER1);
   tr1.setTcSuccess(true);
   tr1.writeTo(writer);

   /* TestCase: V2PortletTests_Portlet_ApiRender_render2                   */
   /* Details: "Method render(RenderRequest, RenderResponse): is called    */
   /* when a Render URL for the portlet is triggered"                      */
   TestResult tr2 = tcd.getTestResultFailed(V2PORTLETTESTS_PORTLET_APIRENDER_RENDER2);
   {
       PortletURL rurl = portletResp.createRenderURL();
       rurl.setPortletMode(PortletMode.VIEW);
       tr2.setTcSuccess(true);       
       tr2.writeTo(writer);
    }
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:44,代码来源:PortletTests_Portlet_ApiRender.java


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