本文整理汇总了Java中javax.portlet.PortletURL.setWindowState方法的典型用法代码示例。如果您正苦于以下问题:Java PortletURL.setWindowState方法的具体用法?Java PortletURL.setWindowState怎么用?Java PortletURL.setWindowState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.portlet.PortletURL
的用法示例。
在下文中一共展示了PortletURL.setWindowState方法的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;
}
示例2: getURLView
import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public PortletURL getURLView(
LiferayPortletResponse liferayPortletResponse,
WindowState windowState)
throws Exception {
PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(
ArtistsPortlet.PORTLET_ID, PortletRequest.RENDER_PHASE);
portletURL.setParameter("jspPage", "/html/artists/view_artist.jsp");
portletURL.setParameter(
"artistId", String.valueOf(_artist.getArtistId()));
portletURL.setWindowState(windowState);
return portletURL;
}
示例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 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 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);
}
示例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 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 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);
}
示例7: 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);
}
示例8: 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);
}
示例9: 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);
}
示例10: _getOnclick
import javax.portlet.PortletURL; //导入方法依赖的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 javax.portlet.PortletURL; //导入方法依赖的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: getURLView
import javax.portlet.PortletURL; //导入方法依赖的package包/类
@Override
public final PortletURL getURLView(LiferayPortletResponse liferayPortletResponse,
WindowState windowState) throws Exception {
String portletId;
if(_isRuntimePortlet){
portletId = ACTIVITY_VIEWER_PORTLET_ID;
}else{
portletId = _portletId;
}
PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(_layout.getPlid(),portletId, PortletRequest.RENDER_PHASE);
portletURL.setWindowState(windowState);
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);
long userId = PrincipalThreadLocal.getUserId();
if(Validator.isNotNull(userId)) {
String mvcPath = getMvcPathView(userId,liferayPortletResponse,windowState);
if(Validator.isNotNull(mvcPath)){
portletURL.setParameter("mvcPath",mvcPath);
}
}
prepareRuntimePortlet(portletURL);
log.debug("portletURL::"+portletURL.toString());
return portletURL;
}
示例13: getURLCalifications
import javax.portlet.PortletURL; //导入方法依赖的package包/类
public static final PortletURL getURLCalifications(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse, LearningActivity activity) throws Exception {
long plid = PortalUtil.getPlidFromPortletId(activity.getGroupId(), ACTIVITY_VIEWER_PORTLET_ID);
log.debug("PLID: "+plid);
if (plid == LayoutConstants.DEFAULT_PLID) {
throw new NoSuchLayoutException();
}
PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(plid, LMS_EDITACTIVITY_PORTLET_ID, PortletRequest.RENDER_PHASE);
portletURL.setWindowState(WindowState.NORMAL);
portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
portletURL.setParameter("actionEditingActivity", StringPool.FALSE);
portletURL.setParameter("actionEditingModule", StringPool.FALSE);
portletURL.setParameter("actionCalifications", StringPool.TRUE);
portletURL.setParameter("actId",Long.toString( activity.getActId()));
long userId = PrincipalThreadLocal.getUserId();
if(Validator.isNotNull(userId)) {
//portletURL.setParameter("mvcPath", "/html/editactivity/editactivity.jsp");
portletURL.setParameter("califications", StringPool.TRUE);
portletURL.setParameter("editing", StringPool.FALSE);
portletURL.setParameter("resId",Long.toString( activity.getActId()));
portletURL.setParameter("resModuleId",Long.toString( activity.getModuleId()));
}
portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
//log.debug(" getURLCalifications: "+portletURL);
return portletURL;
}
示例14: getURLEditActivity
import javax.portlet.PortletURL; //导入方法依赖的package包/类
public static final PortletURL getURLEditActivity(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse, LearningActivity activity) throws Exception {
PortletURL portletURL = null;
if(activity!=null){
long plid = PortalUtil.getPlidFromPortletId(activity.getGroupId(), ACTIVITY_VIEWER_PORTLET_ID);
log.debug("PLID: "+plid);
if (plid == LayoutConstants.DEFAULT_PLID) {
throw new NoSuchLayoutException();
}
portletURL = liferayPortletResponse.createLiferayPortletURL(plid, LMS_EDITACTIVITY_PORTLET_ID, PortletRequest.RENDER_PHASE);
portletURL.setWindowState(WindowState.NORMAL);
portletURL.setParameter("actId",Long.toString( activity.getActId()));
portletURL.setParameter("moduleId",Long.toString( activity.getModuleId()));
portletURL.setParameter("actionEditingActivity", StringPool.TRUE);
portletURL.setParameter("actionCalifications", StringPool.FALSE);
portletURL.setParameter("actionEditingModule", StringPool.FALSE);
portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
long userId = PrincipalThreadLocal.getUserId();
if(Validator.isNotNull(userId)) {
portletURL.setParameter("mvcPath", "/html/editactivity/editactivity.jsp");
portletURL.setParameter("editing", StringPool.TRUE);
portletURL.setParameter("resId",Long.toString( activity.getActId()));
portletURL.setParameter("resModuleId",Long.toString( activity.getModuleId()));
}
portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
//log.debug(" getURLEditActivity: "+portletURL);
}
return portletURL;
}
示例15: getURLCreateActivity
import javax.portlet.PortletURL; //导入方法依赖的package包/类
public static final PortletURL getURLCreateActivity(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse, Module module) throws Exception {
PortletURL portletURL = null;
if(module!=null){
long plid = PortalUtil.getPlidFromPortletId(module.getGroupId(), ACTIVITY_VIEWER_PORTLET_ID);
log.debug("PLID: "+plid);
if (plid == LayoutConstants.DEFAULT_PLID) {
throw new NoSuchLayoutException();
}
portletURL = liferayPortletResponse.createLiferayPortletURL(plid, LMS_EDITACTIVITY_PORTLET_ID, PortletRequest.RENDER_PHASE);
portletURL.setWindowState(WindowState.NORMAL);
portletURL.setParameter("actionEditingActivity", StringPool.TRUE);
portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
portletURL.setParameter("mvcPath", "/html/lmsactivitieslist/newactivity.jsp");
portletURL.setParameter("resModuleId",Long.toString(module.getModuleId()));
portletURL.setParameter("actId",Long.toString(0));
portletURL.setParameter("resId",Long.toString(0));
portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
log.debug(" getURLCreateActivity: "+portletURL);
}
return portletURL;
}