本文整理汇总了Java中com.liferay.portal.kernel.portlet.LiferayWindowState类的典型用法代码示例。如果您正苦于以下问题:Java LiferayWindowState类的具体用法?Java LiferayWindowState怎么用?Java LiferayWindowState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LiferayWindowState类属于com.liferay.portal.kernel.portlet包,在下文中一共展示了LiferayWindowState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateURLJsonObject
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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;
}
示例2: editmodule
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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");
}
}
示例3: render
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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);
}
示例4: render
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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);
}
示例5: render
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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);
}
示例6: render
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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);
}
示例7: render
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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);
}
示例8: render
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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);
}
示例9: render
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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);
}
示例10: _getOnclick
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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();
}
示例11: getURLEdit
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的package包/类
@Override
public final PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws Exception {
PortletURL portletURL = null;
if((_editDetails)&&(GetterUtil.getBoolean(liferayPortletRequest.getAttribute(EDIT_DETAILS)))) {
portletURL = getURLEditDetails(liferayPortletRequest, liferayPortletResponse);
if(Validator.isNotNull(portletURL)) {
prepareRuntimePortlet(portletURL);
return portletURL;
}
}
ThemeDisplay themeDisplay = (ThemeDisplay)liferayPortletRequest.getAttribute(
WebKeys.THEME_DISPLAY);
if(_learningactivity.getModuleId()==0){
portletURL=
PortletURLFactoryUtil.create(liferayPortletRequest,"lmsactivitieslist_WAR_liferaylmsportlet",getControlPanelPlid(themeDisplay), PortletRequest.RENDER_PHASE);
portletURL.setWindowState(LiferayWindowState.POP_UP);
}else{
portletURL = PortletURLFactoryUtil.create(liferayPortletRequest,_portletId,getControlPanelPlid(themeDisplay),PortletRequest.RENDER_PHASE);
}
portletURL.setParameter("editing", StringPool.TRUE);
portletURL.setParameter("resId",Long.toString( _learningactivity.getActId()));
portletURL.setParameter("resModuleId",Long.toString( _learningactivity.getModuleId()));
return portletURL;
}
示例12: setBankTest
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的package包/类
public void setBankTest(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
long actId = ParamUtil.getLong(actionRequest, "actId", 0);
String redirect = actionRequest.getParameter("redirect");
String isMultiple = ParamUtil.getString(actionRequest, "banks-multipleselections", "false");
String isBank = ParamUtil.getString(actionRequest, "is-bank", "false");
String assetCategoryIds = ParamUtil.getString(actionRequest, "assetCategoryIds", StringPool.BLANK);
long[] longCategoryIds = GetterUtil.getLongValues(StringUtil.split(assetCategoryIds));
AssetEntryQuery entryQuery = new AssetEntryQuery();
entryQuery.setAllCategoryIds(longCategoryIds);
if(!Validator.equals(AssetEntryLocalServiceUtil.getEntries(entryQuery).size(), 0)){
LearningActivityLocalServiceUtil.setExtraContentValue(actId,"isBank", isBank);
LearningActivityLocalServiceUtil.setExtraContentValue(actId,"isMultiple", isMultiple);
if(!StringPool.BLANK.equals(assetCategoryIds)){
LearningActivityLocalServiceUtil.setExtraContentValue(actId,"categoriesId", assetCategoryIds);
SessionMessages.add(actionRequest,"data-exist-for-these-categories");
}else{
SessionErrors.add(actionRequest, "error-selector-categories-empty");
}
}else{
SessionErrors.add(actionRequest, "error-not-results");
}
WindowState windowState = actionRequest.getWindowState();
if (Validator.isNotNull(redirect)) {
if (!windowState.equals(LiferayWindowState.POP_UP)) {
actionResponse.sendRedirect(redirect);
}
else {
redirect = PortalUtil.escapeRedirect(redirect);
if (Validator.isNotNull(redirect)) {
actionResponse.sendRedirect(redirect);
}
}
}
}
示例13: newmodule
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的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");
}
示例14: getURLViewInContext
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的package包/类
@Override
public String getURLViewInContext(
LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
String noSuchEntryRedirect) throws Exception {
PortletURL viewPortletURL = liferayPortletResponse.createRenderURL("taskactivity_WAR_liferaylmsportlet");
viewPortletURL.setWindowState(LiferayWindowState.NORMAL);
viewPortletURL.setParameter("jspPage", "/html/taskactivity/view.jsp");
viewPortletURL.setParameter("actId",Long.toString( _learningactivity.getActId()));
return viewPortletURL.toString();
}
示例15: redirectUpdateAccount
import com.liferay.portal.kernel.portlet.LiferayWindowState; //导入依赖的package包/类
protected void redirectUpdateAccount(
HttpServletRequest request, HttpServletResponse response, User user)
throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(
WebKeys.THEME_DISPLAY);
PortletURL portletURL = PortletURLFactoryUtil.create(
request, PortletKeys.LOGIN, themeDisplay.getPlid(),
PortletRequest.RENDER_PHASE);
portletURL.setParameter("saveLastPath", Boolean.FALSE.toString());
portletURL.setParameter("struts_action", "/login/update_account");
PortletURL redirectURL = PortletURLFactoryUtil.create(
request, PortletKeys.FAST_LOGIN, themeDisplay.getPlid(),
PortletRequest.RENDER_PHASE);
redirectURL.setParameter("struts_action", "/login/login_redirect");
redirectURL.setParameter("emailAddress", user.getEmailAddress());
redirectURL.setParameter("anonymousUser", Boolean.FALSE.toString());
redirectURL.setPortletMode(PortletMode.VIEW);
redirectURL.setWindowState(LiferayWindowState.POP_UP);
portletURL.setParameter("redirect", redirectURL.toString());
portletURL.setParameter("userId", String.valueOf(user.getUserId()));
portletURL.setParameter("emailAddress", user.getEmailAddress());
portletURL.setParameter("firstName", user.getFirstName());
portletURL.setParameter("lastName", user.getLastName());
portletURL.setPortletMode(PortletMode.VIEW);
portletURL.setWindowState(LiferayWindowState.POP_UP);
response.sendRedirect(portletURL.toString());
}