• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java LiferayPortletURL类的典型用法和代码示例

java 7次浏览

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

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

示例1: getSaveAndContinueRedirect

点赞 3

import com.liferay.portal.kernel.portlet.LiferayPortletURL; //导入依赖的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

点赞 3

import com.liferay.portal.kernel.portlet.LiferayPortletURL; //导入依赖的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

点赞 3

import com.liferay.portal.kernel.portlet.LiferayPortletURL; //导入依赖的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: buildPath

点赞 2

import com.liferay.portal.kernel.portlet.LiferayPortletURL; //导入依赖的package包/类
@Override
public String buildPath(final LiferayPortletURL liferayPortletURL) {
	String result = super.buildPath(liferayPortletURL);

	if (result != null && result.contains("/-/")) {
		result = result.replaceAll("/-/", "/");
	}

	return result;
}
 

开发者ID:fraunhoferfokus,
项目名称:particity,
代码行数:11,
代码来源:CustomURLMapper.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)