• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java WindowStateException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.portlet.WindowStateException的典型用法代码示例。如果您正苦于以下问题:Java WindowStateException类的具体用法?Java WindowStateException怎么用?Java WindowStateException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: generateURLJsonObject

import javax.portlet.WindowStateException; //导入依赖的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: editmodule

import javax.portlet.WindowStateException; //导入依赖的package包/类
@ProcessAction(name = "editmodule")
public void editmodule(ActionRequest request, ActionResponse response)
		throws Exception {
	long key = ParamUtil.getLong(request, "resourcePrimKey");
	if (Validator.isNotNull(key)) {
		response.setRenderParameter("moduleId", Long.toString(key));
		try {
			response.setWindowState(LiferayWindowState.POP_UP);
		} catch (WindowStateException e) {
			if(log.isDebugEnabled())e.printStackTrace();
			if(log.isErrorEnabled())log.error(e.getMessage());
		}
		response.setRenderParameter("view", "editmodule");
		response.setRenderParameter("editType", "edit");
	}
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:17,代码来源:modulePortlet.java


示例3: render

import javax.portlet.WindowStateException; //导入依赖的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: V2ExceptionTests_WindowStateException_ApiRender_getState */
  /* Details: "Method getState(): Returns the WindowState object */
  /* causing this exception" */
  TestResult tr0 =
      tcd.getTestResultFailed(V2EXCEPTIONTESTS_WINDOWSTATEEXCEPTION_APIRENDER_GETSTATE);
  WindowState ws = new WindowState("teststate");
  WindowStateException wse = new WindowStateException("Unsupported State Causing Exception", ws);
  if (wse.getState().toString().equals("teststate")) {
    tr0.setTcSuccess(true);
  }
  tr0.writeTo(writer);

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


示例4: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
@Override
public void setWindowState(WindowState windowState) throws WindowStateException {
	if (!CollectionUtils.contains(this.portalContext.getSupportedWindowStates(), windowState)) {
		throw new WindowStateException("WindowState not supported", windowState);
	}
	this.windowState = windowState;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:MockPortletURL.java


示例5: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
@Override
public void setWindowState(WindowState windowState) throws WindowStateException {
	if (!CollectionUtils.contains(getPortalContext().getSupportedWindowStates(), windowState)) {
		throw new WindowStateException("WindowState not supported", windowState);
	}
	this.windowState = windowState;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:MockStateAwareResponse.java


示例6: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
@Override
public void setWindowState(WindowState windowState) throws WindowStateException {
	if (this.redirectedUrl != null) {
		throw new IllegalStateException("Cannot set WindowState after sendRedirect has been called");
	}
	super.setWindowState(windowState);
	this.redirectAllowed = false;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:9,代码来源:MockActionResponse.java


示例7: _getOnclick

import javax.portlet.WindowStateException; //导入依赖的package包/类
private String _getOnclick()
{

	PortletURL portletURL = PortletURLFactoryUtil.create(
		request, "blade_document_action_portlet_BladeDocumentActionPortlet",
		_themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);

	String fileName = fileVersion.getFileName();
	String mimeType = fileVersion.getMimeType();
	String version = fileVersion.getVersion();
	String createdDate = fileVersion.getCreateDate().toString();
	String createdUserName = fileVersion.getUserName();
	String statusLabel = WorkflowConstants.getStatusLabel(
		fileVersion.getStatus());

	portletURL.setParameter("fileName", fileName);
	portletURL.setParameter("mimeType", mimeType);
	portletURL.setParameter("version", version);
	portletURL.setParameter("statusLabel", statusLabel);
	portletURL.setParameter("createdDate", createdDate);
	portletURL.setParameter("createdUserName", createdUserName);

	try {
		portletURL.setWindowState(LiferayWindowState.POP_UP);
	}
	catch (WindowStateException wse) {
		_log.error(wse);
	}

	StringBuilder stringBuilder = new StringBuilder();

	stringBuilder.append("Liferay.Util.openWindow({");
	stringBuilder.append("dialog: {cache: false,width:800,modal: true},");
	stringBuilder.append("title: 'basic information',id: ");
	stringBuilder.append("'testPopupIdUnique',uri: '");
	stringBuilder.append(portletURL.toString() + "'});");

	return stringBuilder.toString();
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:40,代码来源:BladeActionDisplayContext.java


示例8: setWindowStateRenderParameter

import javax.portlet.WindowStateException; //导入依赖的package包/类
public static void setWindowStateRenderParameter(ActionResponse actionResponse,WindowState winState) throws WindowStateException
{
	actionResponse.setWindowState(winState);
	actionResponse.setRenderParameter("p_p_state", winState.toString()); 
		// En teor�a el par�metro windowState del actionURL deber�a ser suficiente,
		// y el setWindowState deber�a ser una in�til reiteraci�n, pero aun as�
		// lo �nico que funciona es poner A PELO el p_p_state, o hago algo mal o es penoso en fin...		
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:9,代码来源:LiferayViewUtil.java


示例9: setPortletURLBack

import javax.portlet.WindowStateException; //导入依赖的package包/类
public static String setPortletURLBack(ThemeDisplay themeDisplay,String backURL) throws WindowStateException
{
	String jsBackURL;
	if (backURL != null) jsBackURL = "window.location.href='" + backURL + "'";
	else jsBackURL = "window.history.go(-1)";
	themeDisplay.getPortletDisplay().setURLBack("javascript:" + jsBackURL);
	return jsBackURL; // Como JavaScript
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:9,代码来源:LiferayViewUtil.java


示例10: deleteActivityBank

import javax.portlet.WindowStateException; //导入依赖的package包/类
public void deleteActivityBank(ActionRequest actionRequest, ActionResponse actionResponse) 
  		throws PortalException, SystemException, IOException, WindowStateException{
  	
  	long actId = ParamUtil.getLong(actionRequest, "resId", 0);

AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry("com.liferay.lms.model.LearningActivity", actId);
assetEntry.setVisible(false);
AssetEntryLocalServiceUtil.updateAssetEntry(assetEntry);
  }
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:10,代码来源:LmsActivitiesList.java


示例11: newmodule

import javax.portlet.WindowStateException; //导入依赖的package包/类
@ProcessAction(name = "newmodule")
public void newmodule(ActionRequest request, ActionResponse response) {
	response.setRenderParameter("view", "editmodule");
	try {
		response.setWindowState(LiferayWindowState.POP_UP);
	} catch (WindowStateException e) {
		if(log.isDebugEnabled())e.printStackTrace();
		if(log.isErrorEnabled())log.error(e.getMessage());
	}
	response.setRenderParameter("moduleId", "0");
	response.setRenderParameter("editType", "add");
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:13,代码来源:modulePortlet.java


示例12: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
public void setWindowState(WindowState windowState) throws WindowStateException {
	if (this.redirectedUrl != null) {
		throw new IllegalStateException("Cannot set WindowState after sendRedirect has been called");
	}
	super.setWindowState(windowState);
	this.redirectAllowed = false;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:8,代码来源:MockActionResponse.java


示例13: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
@Override
public void setWindowState(WindowState windowState) throws WindowStateException {
   String meth = "setWindowState";
   Object[] args = { windowState };
   checkArgs(meth, args);
   return;

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


示例14: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
public void setWindowState(WindowState windowState)
      throws WindowStateException {
   ArgumentUtility.validateNotNull("windowState", windowState);
   if (isWindowStateAllowed(windowState)) {
      checkSetStateChanged();
      responseContext.setWindowState(windowState);
   } else {
      throw new WindowStateException("Can't set this WindowState",
            windowState);
   }
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:12,代码来源:StateAwareResponseImpl.java


示例15: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
public void setWindowState(WindowState windowState)
      throws WindowStateException {
   ArgumentUtility.validateNotNull("windowState", windowState);
   if (isWindowStateAllowed(windowState)) {
      urlProvider.setWindowState(windowState);
   } else {
      throw new WindowStateException("Can't set this WindowState",
            windowState);
   }
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:11,代码来源:PortletURLImpl.java


示例16: getURL

import javax.portlet.WindowStateException; //导入依赖的package包/类
public String getURL(
	PortletRequest portletRequest, PortletResponse portletResponse) {

	HttpServletRequest servletRequest = _portal.getHttpServletRequest(
		portletRequest);

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

	FileEntry fileEntry = _retrieveFile(servletRequest);

	PortletURL portletURL = PortletURLFactoryUtil.create(
		servletRequest,
		"blade_document_action_portlet_BladeDocumentActionPortlet",
		themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);

	String fileName = fileEntry.getFileName();
	String mimeType = fileEntry.getMimeType();
	String version = fileEntry.getVersion();
	String createdDate = fileEntry.getCreateDate().toString();
	String createdUserName = fileEntry.getUserName();
	String statusLabel = null;

	try {
		statusLabel = WorkflowConstants.getStatusLabel(
			fileEntry.getLatestFileVersion().getStatus());
	}
	catch (PortalException pe) {
		_log.error(pe);
	}

	portletURL.setParameter("fileName", fileName);
	portletURL.setParameter("mimeType", mimeType);
	portletURL.setParameter("version", version);
	portletURL.setParameter("statusLabel", statusLabel);
	portletURL.setParameter("createdDate", createdDate);
	portletURL.setParameter("createdUserName", createdUserName);

	try {
		portletURL.setWindowState(LiferayWindowState.POP_UP);
	}
	catch (WindowStateException wse) {
		_log.error(wse);
	}

	StringBuilder stringBuilder = new StringBuilder();

	stringBuilder.append("javascript:Liferay.Util.openWindow(");
	stringBuilder.append("{dialog: {cache: false,width:800,modal: true},");
	stringBuilder.append("title: 'basic information',id: ");
	stringBuilder.append("'testPopupIdUnique',uri: '");
	stringBuilder.append(portletURL.toString() + "'});");

	return stringBuilder.toString();
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:56,代码来源:BladeActionConfigurationIcon.java


示例17: copyRequestToRenderParameters

import javax.portlet.WindowStateException; //导入依赖的package包/类
public static void copyRequestToRenderParameters(ActionRequest actionRequest,ActionResponse actionResponse) throws WindowStateException
{	
	copyRequestToRenderParameters(actionRequest,null,null,actionResponse);
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:5,代码来源:LiferayViewUtil.java


示例18: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
public void setWindowState(WindowState windowState) throws WindowStateException {
	if (!CollectionUtils.contains(this.portalContext.getSupportedWindowStates(), windowState)) {
		throw new WindowStateException("WindowState not supported", windowState);
	}
	this.windowState = windowState;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:7,代码来源:MockPortletURL.java


示例19: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
public void setWindowState(WindowState windowState) throws WindowStateException {
	if (!CollectionUtils.contains(getPortalContext().getSupportedWindowStates(), windowState)) {
		throw new WindowStateException("WindowState not supported", windowState);
	}
	this.windowState = windowState;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:7,代码来源:MockStateAwareResponse.java


示例20: setWindowState

import javax.portlet.WindowStateException; //导入依赖的package包/类
@Override
public void setWindowState(WindowState windowState) throws WindowStateException {
   ((PortletURL)wrapped).setWindowState(windowState);
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:5,代码来源:PortletURLWrapper.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BrowserHyperlinkListener类代码示例发布时间:2022-05-22
下一篇:
Java IMetricsConsumer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap