本文整理汇总了Java中com.liferay.portal.kernel.portlet.PortletURLFactoryUtil类的典型用法代码示例。如果您正苦于以下问题:Java PortletURLFactoryUtil类的具体用法?Java PortletURLFactoryUtil怎么用?Java PortletURLFactoryUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PortletURLFactoryUtil类属于com.liferay.portal.kernel.portlet包,在下文中一共展示了PortletURLFactoryUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getSaveAndContinueRedirect
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
protected String getSaveAndContinueRedirect(
ActionRequest actionRequest, TaskRecord taskRecord, Layout layout, String redirect)
throws Exception {
PortletConfig portletConfig = (PortletConfig)actionRequest.getAttribute(
JavaConstants.JAVAX_PORTLET_CONFIG);
LiferayPortletURL portletURL = PortletURLFactoryUtil.create(actionRequest, portletConfig.getPortletName(), layout, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcRenderCommandName", "editTaskRecord");
portletURL.setParameter(Constants.CMD, Constants.UPDATE, false);
portletURL.setParameter("redirect", redirect, false);
portletURL.setParameter(
"groupId", String.valueOf(taskRecord.getGroupId()), false);
portletURL.setParameter(
"taskRecordId", String.valueOf(taskRecord.getTaskRecordId()), false);
portletURL.setWindowState(actionRequest.getWindowState());
return portletURL.toString();
}
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:22,代码来源:EditTaskRecordMVCActionCommand.java
示例2: getSaveAndContinueRedirect
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
protected String getSaveAndContinueRedirect(
ActionRequest actionRequest, Contact contact, Layout layout, String redirect)
throws Exception {
_log.info("getSaveAndContinueRedirect()");
PortletConfig portletConfig = (PortletConfig)actionRequest.getAttribute(
JavaConstants.JAVAX_PORTLET_CONFIG);
LiferayPortletURL portletURL = PortletURLFactoryUtil.create(actionRequest, portletConfig.getPortletName(), layout, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcRenderCommandName", "editContact");
portletURL.setParameter(Constants.CMD, Constants.UPDATE, false);
portletURL.setParameter("redirect", redirect, false);
portletURL.setParameter(
"groupId", String.valueOf(contact.getGroupId()), false);
portletURL.setParameter(
"contactId", String.valueOf(contact.getContactId()), false);
portletURL.setWindowState(actionRequest.getWindowState());
return portletURL.toString();
}
开发者ID:inofix,项目名称:ch-inofix-contact-manager,代码行数:24,代码来源:EditContactMVCActionCommand.java
示例3: getSaveAndContinueRedirect
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
protected String getSaveAndContinueRedirect(
ActionRequest actionRequest, Measurement measurement, Layout layout, String redirect)
throws Exception {
PortletConfig portletConfig = (PortletConfig)actionRequest.getAttribute(
JavaConstants.JAVAX_PORTLET_CONFIG);
LiferayPortletURL portletURL = PortletURLFactoryUtil.create(actionRequest, portletConfig.getPortletName(), layout, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcRenderCommandName", "editMeasurement");
portletURL.setParameter(Constants.CMD, Constants.UPDATE, false);
portletURL.setParameter("redirect", redirect, false);
portletURL.setParameter(
"groupId", String.valueOf(measurement.getGroupId()), false);
portletURL.setParameter(
"measurementId", String.valueOf(measurement.getMeasurementId()), false);
portletURL.setWindowState(actionRequest.getWindowState());
return portletURL.toString();
}
开发者ID:inofix,项目名称:ch-inofix-data-manager,代码行数:22,代码来源:EditMeasurementMVCActionCommand.java
示例4: add
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例5: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例6: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例7: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例8: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例9: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例10: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例11: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例12: _getOnclick
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例13: getTaskRecords
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
protected List<TaskRecord> getTaskRecords(PortletRequest request) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
PortletURL iteratorURL = PortletURLFactoryUtil.create(request, PortletKeys.TIMETRACKER,
themeDisplay.getLayout(), PortletRequest.RENDER_PHASE);
String description = ParamUtil.getString(request, "description");
boolean advancedSearch = ParamUtil.getBoolean(request, "advancedSearch", false);
boolean andOperator = ParamUtil.getBoolean(request, "andOperator", true);
int end = ParamUtil.getInteger(request, "end");
boolean ignoreFromDate = ParamUtil.getBoolean(request, "ignoreFromDate");
Date fromDate = null;
if (!ignoreFromDate) {
int fromDateDay = ParamUtil.getInteger(request, "fromDateDay");
int fromDateMonth = ParamUtil.getInteger(request, "fromDateMonth");
int fromDateYear = ParamUtil.getInteger(request, "fromDateYear");
fromDate = PortalUtil.getDate(fromDateMonth, fromDateDay, fromDateYear);
}
String keywords = ParamUtil.getString(request, "keywords");
String orderByCol = ParamUtil.getString(request, "orderByCol", "modifiedDate");
String orderByType = ParamUtil.getString(request, "orderByType", "desc");
long ownerUserId = ParamUtil.getLong(request, "ownerUserId");
int start = ParamUtil.getInteger(request, "start");
int status = ParamUtil.getInteger(request, Field.STATUS);
TaskRecordSearch taskRecordSearch = new TaskRecordSearch(request, iteratorURL);
orderByCol = taskRecordSearch.getOrderByCol();
boolean ignoreUntilDate = ParamUtil.getBoolean(request, "ignoreUntilDate");
Date untilDate = null;
if (!ignoreUntilDate) {
int untilDateDay = ParamUtil.getInteger(request, "untilDateDay");
int untilDateMonth = ParamUtil.getInteger(request, "untilDateMonth");
int untilDateYear = ParamUtil.getInteger(request, "untilDateYear");
untilDate = PortalUtil.getDate(untilDateMonth, untilDateDay, untilDateYear);
}
String workPackage = ParamUtil.getString(request, "workPackage");
boolean reverse = "desc".equals(orderByType);
Sort sort = new Sort(orderByCol, reverse);
Hits hits = null;
if (advancedSearch) {
hits = TaskRecordServiceUtil.search(themeDisplay.getUserId(), themeDisplay.getScopeGroupId(), ownerUserId,
workPackage, description, status, fromDate, untilDate, null, andOperator, advancedSearch, start,
end, sort);
} else {
hits = TaskRecordServiceUtil.search(themeDisplay.getUserId(), themeDisplay.getScopeGroupId(), 0, keywords,
start, end, sort);
}
List<TaskRecord> taskRecords = TimetrackerUtil.getTaskRecords(hits);
return taskRecords;
}
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:70,代码来源:ExportTaskRecordsMVCResourceCommand.java
示例14: render
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例15: getURL
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的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
示例16: locateTaskRecordManager
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
private PortletURL locateTaskRecordManager(LiferayPortletRequest liferayPortletRequest) throws PortalException {
long portletPlid = PortalUtil.getPlidFromPortletId(_taskRecord.getGroupId(), false, PortletKeys.TIMETRACKER);
PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest, PortletKeys.TIMETRACKER,
portletPlid, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcPath", "/edit_task_record.jsp");
portletURL.setParameter("taskRecordId", String.valueOf(_taskRecord.getTaskRecordId()));
return portletURL;
}
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:14,代码来源:TaskRecordAssetRenderer.java
示例17: getURLAdd
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
@Override
public PortletURL getURLAdd(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws PortalException {
ThemeDisplay themeDisplay = (ThemeDisplay) liferayPortletRequest.getAttribute(WebKeys.THEME_DISPLAY);
User user = themeDisplay.getUser();
Group group = user.getGroup();
if (group != null) {
long portletPlid = PortalUtil.getPlidFromPortletId(group.getGroupId(), false, PortletKeys.TIMETRACKER);
PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest, PortletKeys.TIMETRACKER,
portletPlid, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcPath", "/edit_task_record.jsp");
String redirect = (String) liferayPortletRequest.getAttribute("redirect");
if (Validator.isNotNull(redirect)) {
portletURL.setParameter("redirect", redirect);
}
return portletURL;
} else {
return null;
}
}
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:34,代码来源:TaskRecordAssetRendererFactory.java
示例18: getURLAdd
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
@Override
public PortletURL getURLAdd(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws PortalException {
ThemeDisplay themeDisplay = (ThemeDisplay) liferayPortletRequest.getAttribute(WebKeys.THEME_DISPLAY);
User user = themeDisplay.getUser();
Group group = user.getGroup();
if (group != null) {
long portletPlid = PortalUtil.getPlidFromPortletId(group.getGroupId(), false, PortletKeys.CONTACT_MANAGER);
PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest, PortletKeys.CONTACT_MANAGER,
portletPlid, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcPath", "/edit_contact.jsp");
String redirect = (String) liferayPortletRequest.getAttribute("redirect");
if (Validator.isNotNull(redirect)) {
portletURL.setParameter("redirect", redirect);
}
return portletURL;
} else {
return null;
}
}
开发者ID:inofix,项目名称:ch-inofix-contact-manager,代码行数:34,代码来源:ContactAssetRendererFactory.java
示例19: locateContactManager
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
private PortletURL locateContactManager(LiferayPortletRequest liferayPortletRequest) throws PortalException {
long portletPlid = PortalUtil.getPlidFromPortletId(_contact.getGroupId(), false, PortletKeys.CONTACT_MANAGER);
PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest, PortletKeys.CONTACT_MANAGER,
portletPlid, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcPath", "/edit_contact.jsp");
portletURL.setParameter("contactId", String.valueOf(_contact.getContactId()));
return portletURL;
}
开发者ID:inofix,项目名称:ch-inofix-contact-manager,代码行数:14,代码来源:ContactAssetRenderer.java
示例20: getURLAdd
import com.liferay.portal.kernel.portlet.PortletURLFactoryUtil; //导入依赖的package包/类
@Override
public PortletURL getURLAdd(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws PortalException {
ThemeDisplay themeDisplay = (ThemeDisplay) liferayPortletRequest.getAttribute(WebKeys.THEME_DISPLAY);
User user = themeDisplay.getUser();
Group group = user.getGroup();
if (group != null) {
long portletPlid = PortalUtil.getPlidFromPortletId(group.getGroupId(), false, PortletKeys.DATA_MANAGER);
PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest, PortletKeys.DATA_MANAGER,
portletPlid, PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcPath", "/edit_measurement.jsp");
String redirect = (String) liferayPortletRequest.getAttribute("redirect");
if (Validator.isNotNull(redirect)) {
portletURL.setParameter("redirect", redirect);
}
return portletURL;
} else {
return null;
}
}
开发者ID:inofix,项目名称:ch-inofix-data-manager,代码行数:34,代码来源:MeasurementAssetRendererFactory.java
注:本文中的com.liferay.portal.kernel.portlet.PortletURLFactoryUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论