本文整理汇总了Java中com.liferay.portal.kernel.portlet.LiferayPortletRequest类的典型用法代码示例。如果您正苦于以下问题:Java LiferayPortletRequest类的具体用法?Java LiferayPortletRequest怎么用?Java LiferayPortletRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LiferayPortletRequest类属于com.liferay.portal.kernel.portlet包,在下文中一共展示了LiferayPortletRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getLink
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public String getLink()
throws Exception {
String link = null;
link = getAssetRenderer().getURLViewInContext(
(LiferayPortletRequest) _portletRequest,
(LiferayPortletResponse) _portletResponse, null);
if (Validator.isNull(link)) {
link = getNotLayoutBoundJournalArticleUrl();
}
return link;
}
开发者ID:peerkar,项目名称:liferay-gsearch,代码行数:20,代码来源:JournalArticleItemBuilder.java
示例2: getURLViewInContext
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
@Override
public final String getURLViewInContext(
LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
String noSuchEntryRedirect) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) liferayPortletRequest.getAttribute(WebKeys.THEME_DISPLAY);
PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(_layout.getPlid(), _portletId, PortletRequest.RENDER_PHASE);
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);
String mvcPath = getMvcPathView(themeDisplay.getUserId(),liferayPortletResponse,liferayPortletRequest.getWindowState());
if(Validator.isNotNull(mvcPath)){
portletURL.setParameter("mvcPath",mvcPath);
}
prepareRuntimePortlet(portletURL);
return portletURL.toString();
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:24,代码来源:LearningActivityBaseAssetRenderer.java
示例3: editactivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public void editactivity(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException, Exception {
long actId = ParamUtil.getInteger(actionRequest, "resId");
// LearningActivity learnact =
// com.liferay.lms.service.LearningActivityServiceUtil.getLearningActivity(actId);
LearningActivityAssetRendererFactory laf = new LearningActivityAssetRendererFactory();
if (laf != null) {
AssetRenderer assetRenderer = laf.getAssetRenderer(actId, 0);
String urlEdit = assetRenderer.getURLEdit((LiferayPortletRequest) actionRequest, (LiferayPortletResponse) actionResponse).toString();
Portlet urlEditPortlet =PortletLocalServiceUtil.getPortletById(HttpUtil.getParameter(urlEdit, "p_p_id",false));
if(urlEditPortlet!=null) {
PublicRenderParameter actIdPublicParameter = urlEditPortlet.getPublicRenderParameter("actId");
if(actIdPublicParameter!=null) {
urlEdit=HttpUtil.removeParameter(urlEdit,PortletQNameUtil.getPublicRenderParameterName(actIdPublicParameter.getQName()));
}
urlEdit=HttpUtil.addParameter(urlEdit, StringPool.UNDERLINE+urlEditPortlet.getPortletId()+StringPool.UNDERLINE+"resId", actId);
urlEdit=HttpUtil.removeParameter(urlEdit, StringPool.UNDERLINE+urlEditPortlet.getPortletId()+StringPool.UNDERLINE+"actionEditingDetails");
urlEdit=HttpUtil.addParameter(urlEdit, StringPool.UNDERLINE+urlEditPortlet.getPortletId()+StringPool.UNDERLINE+"actionEditingDetails", true);
}
actionResponse.sendRedirect(urlEdit);
}
SessionMessages.add(actionRequest, "asset-renderer-not-defined");
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:27,代码来源:LmsActivitiesList.java
示例4: viewactivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public void viewactivity(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException, Exception {
long actId = ParamUtil.getInteger(actionRequest, "actId");
AssetRendererFactory laf = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(LearningActivity.class.getName());
//auditing
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
AuditingLogFactory.audit(themeDisplay.getCompanyId(), themeDisplay.getScopeGroupId(), LearningActivity.class.getName(),
actId, themeDisplay.getUserId(), AuditConstants.GET, null);
if (laf != null) {
AssetRenderer assetRenderer = laf.getAssetRenderer(actId, 0);
String urlEdit = assetRenderer.getURLViewInContext((LiferayPortletRequest) actionRequest, (LiferayPortletResponse) actionResponse, "").toString();
actionResponse.sendRedirect(urlEdit);
}
SessionMessages.add(actionRequest, "asset-renderer-not-defined");
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:20,代码来源:LmsActivitiesList.java
示例5: getURLEdit
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public PortletURL getURLEdit(
LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws Exception
{
_log.debug("getURLEdit: entrada");
HttpServletRequest request = liferayPortletRequest.getHttpServletRequest();
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
PortletURL portletURL = liferayPortletResponse.createRenderURL("taskactivity_WAR_liferaylmsportlet");
portletURL.setParameter("mvcPath", "/html/taskactivity/admin/edit.jsp");
portletURL.setParameter("jspPage", "/html/taskactivity/admin/edit.jsp");
portletURL.setParameter("actId", Long.toString(_learningactivity.getActId()));
_log.debug("getURLEdit: "+portletURL.toString());
return portletURL;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:19,代码来源:TaskAssetRenderer.java
示例6: getURLAdd
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public PortletURL getURLAdd(LiferayPortletRequest liferayPortletRequest, LiferayPortletResponse liferayPortletResponse){
ThemeDisplay themeDisplay = (ThemeDisplay)liferayPortletRequest.getAttribute(WebKeys.THEME_DISPLAY);
try {
if(!themeDisplay.getPermissionChecker().
hasPermission(themeDisplay.getScopeGroupId(), "com.liferay.lms.coursemodel",themeDisplay.getScopeGroupId(),"ADD_COURSE")){
return null;
}
PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest,PORTLET_ID,getControlPanelPlid(themeDisplay),PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcPath", "/html/courseadmin/editcourse.jsp");
return portletURL;
}
catch(Throwable t) {
return null;
}
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:20,代码来源:CourseAssetRendererFactory.java
示例7: getURLEdit
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
@Override
public PortletURL getURLEdit(
LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse)
throws Exception {
PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(
getControlPanelPlid(liferayPortletRequest),
ArtistsPortlet.PORTLET_ID, PortletRequest.RENDER_PHASE);
portletURL.setParameter("jspPage", "/html/artists/edit_artist.jsp");
portletURL.setParameter(
"artistId", String.valueOf(_artist.getArtistId()));
return portletURL;
}
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:17,代码来源:ArtistAssetRenderer.java
示例8: getAssetViewURL
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
/**
* Gets the search result's view URL
*
* @param document The searched document
* @param request The request
* @param response The response
* @param currentLayout The current page
* @param tabId The search tab ID
*
* @return The search result URL
*/
private String getAssetViewURL(Document document, PortletRequest request, PortletResponse response, Layout currentLayout, String tabId, String keywords) {
String className = document.get(Field.ENTRY_CLASS_NAME);
long classPK = GetterUtil.getLong(document.get(Field.ENTRY_CLASS_PK));
String currentUrl = this.portal.getCurrentURL(request);
String returnedUrl;
if(ASSET_TYPE.equals(className) && classPK > 0) {
try {
String portletId = (String) request.getAttribute(WebKeys.PORTLET_ID);
PortletURL viewInPortletUrlObj = this.portletUrlFactory.create(request, portletId, currentLayout, LIFECYCLE_RENDER);
viewInPortletUrlObj.setParameter(PortletRequestParameter.VIEW_MODE.getName(), ViewMode.VIEW_JOURNAL.getParamValue());
viewInPortletUrlObj.setParameter(Field.ENTRY_CLASS_PK, Long.toString(classPK));
viewInPortletUrlObj.setParameter(PortletRequestParameter.TAB_ID.getName(), tabId);
viewInPortletUrlObj.setParameter(PortletRequestParameter.KEYWORDS.getName(), keywords);
String viewInPortletUrl = viewInPortletUrlObj.toString();
AssetRendererFactory<?> assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
AssetRenderer<?> assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
returnedUrl = assetRenderer.getURLViewInContext((LiferayPortletRequest) request, (LiferayPortletResponse) response, viewInPortletUrl);
} catch(Exception e) {
returnedUrl = currentUrl;
}
} else {
returnedUrl = currentUrl;
}
return returnedUrl;
}
开发者ID:savoirfairelinux,项目名称:flashlight-search,代码行数:40,代码来源:JournalArticleSearchResultProcessor.java
示例9: getURLEdit
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的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;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:29,代码来源:LearningActivityBaseAssetRenderer.java
示例10: getURLCalifications
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的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;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:37,代码来源:LmsActivitiesList.java
示例11: getURLEditActivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的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;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:41,代码来源:LmsActivitiesList.java
示例12: getURLCreateActivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的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;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:29,代码来源:LmsActivitiesList.java
示例13: getURLEditModule
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public static final PortletURL getURLEditModule(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_EDITMODULE_PORTLET_ID, PortletRequest.RENDER_PHASE);
portletURL.setWindowState(WindowState.NORMAL);
portletURL.setParameter("actionEditingModule", StringPool.TRUE);
portletURL.setParameter("actionEditingActivity", StringPool.FALSE);
portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
portletURL.setParameter("actionCalifications", StringPool.FALSE);
portletURL.setParameter("view", "editmodule");
portletURL.setParameter("moduleId",Long.toString(module.getModuleId()));
portletURL.setParameter("actId","");
portletURL.setParameter("resourcePrimKey",Long.toString(module.getModuleId()));
portletURL.setParameter("editType","edit");
portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
//log.debug(" getURLEditModule: "+portletURL);
}
return portletURL;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:33,代码来源:LmsActivitiesList.java
示例14: getURLCreateModule
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public static final PortletURL getURLCreateModule(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse, ThemeDisplay themeDisplay) throws Exception {
Layout layout = null;
@SuppressWarnings("unchecked")
List<Layout> layouts = LayoutLocalServiceUtil.dynamicQuery(LayoutLocalServiceUtil.dynamicQuery().
add(PropertyFactoryUtil.forName("privateLayout").eq(false)).
add(PropertyFactoryUtil.forName("type").eq(LayoutConstants.TYPE_PORTLET)).
add(PropertyFactoryUtil.forName("companyId").eq(themeDisplay.getCompanyId())).
add(PropertyFactoryUtil.forName("groupId").eq(themeDisplay.getScopeGroupId())).
add(PropertyFactoryUtil.forName("friendlyURL").eq("/reto")), 0, 1);
if(layouts.isEmpty()) {
throw new NoSuchLayoutException();
}
layout = layouts.get(0);
PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(layout.getPlid(), LMS_EDITMODULE_PORTLET_ID, PortletRequest.RENDER_PHASE);
portletURL.setWindowState(WindowState.NORMAL);
portletURL.setParameter("actionEditingModule", StringPool.TRUE);
portletURL.setParameter("actionEditingActivity", StringPool.FALSE);
portletURL.setParameter("actionEditingDetails", StringPool.FALSE);
portletURL.setParameter("actionCalifications", StringPool.FALSE);
portletURL.setParameter("view", "editmodule");
portletURL.setParameter("moduleId",Long.toString(0));
portletURL.setParameter("actId","");
portletURL.setParameter("resourcePrimKey",Long.toString(0));
portletURL.setParameter("editType","add");
portletURL.setParameter("p_o_p_id",ACTIVITY_VIEWER_PORTLET_ID);
//log.debug(" getURLCreateModule: "+portletURL);
return portletURL;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:38,代码来源:LmsActivitiesList.java
示例15: editactivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public void editactivity(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException, Exception {
long actId = ParamUtil.getInteger(actionRequest, "actId");
// LearningActivity learnact =
// com.liferay.lms.service.LearningActivityServiceUtil.getLearningActivity(actId);
AssetRendererFactory laf = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(LearningActivity.class.getName());
if (laf != null) {
AssetRenderer assetRenderer = laf.getAssetRenderer(actId, 0);
String urlEdit = assetRenderer.getURLEdit((LiferayPortletRequest) actionRequest, (LiferayPortletResponse) actionResponse).toString();
actionResponse.sendRedirect(urlEdit);
}
SessionMessages.add(actionRequest, "asset-renderer-not-defined");
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:15,代码来源:ExecActivity.java
示例16: editactivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public void editactivity(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException, SystemException, Exception {
long actId = ParamUtil.getInteger(actionRequest, "resId");
AssetRendererFactory laf = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(LearningActivity.class.getName());
if (laf != null) {
AssetRenderer assetRenderer = laf.getAssetRenderer(actId, 0);
String urlEdit = assetRenderer.getURLEdit((LiferayPortletRequest) actionRequest, (LiferayPortletResponse) actionResponse).toString();
actionResponse.sendRedirect(urlEdit);
}
SessionMessages.add(actionRequest, "asset-renderer-not-defined");
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:12,代码来源:SurveyActivity.java
示例17: viewactivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public void viewactivity(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException, Exception {
long actId = ParamUtil.getInteger(actionRequest, "actId");
LearningActivity learnact = com.liferay.lms.service.LearningActivityServiceUtil.getLearningActivity(actId);
LearningActivityAssetRendererFactory laf = new LearningActivityAssetRendererFactory();
if (laf != null) {
AssetRenderer assetRenderer = laf.getAssetRenderer(actId, 0);
String urlEdit = assetRenderer.getURLViewInContext((LiferayPortletRequest) actionRequest, (LiferayPortletResponse) actionResponse, "").toString();
actionResponse.sendRedirect(urlEdit);
}
SessionMessages.add(actionRequest, "asset-renderer-not-defined");
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:15,代码来源:ActivityNavigatorPortlet.java
示例18: editactivity
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
public void editactivity(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException, SystemException, Exception {
long actId = ParamUtil.getInteger(actionRequest, "actId");
LearningActivityAssetRendererFactory laf = new LearningActivityAssetRendererFactory();
if (laf != null) {
AssetRenderer assetRenderer = laf.getAssetRenderer(actId, 0);
String urlEdit = assetRenderer.getURLEdit((LiferayPortletRequest) actionRequest, (LiferayPortletResponse) actionResponse).toString();
actionResponse.sendRedirect(urlEdit);
}
SessionMessages.add(actionRequest, "asset-renderer-not-defined");
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:12,代码来源:OnlineActivity.java
示例19: getURLEditDetails
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的package包/类
@Override
protected PortletURL getURLEditDetails(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws Exception {
PortletURL portletURL = PortletURLFactoryUtil.create(liferayPortletRequest,getPortletId(),getLayout().getPlid(),PortletRequest.RENDER_PHASE);
portletURL.setParameter("mvcPath", "/html/surveyactivity/admin/editquestions.jsp");
portletURL.setParameter("actionEditingDetails", StringPool.TRUE);
portletURL.setParameter("resId",Long.toString( getLearningactivity().getActId()));
return portletURL;
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:10,代码来源:SurveyAssetRenderer.java
示例20: getURLViewInContext
import com.liferay.portal.kernel.portlet.LiferayPortletRequest; //导入依赖的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();
}
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:12,代码来源:TaskAssetRenderer.java
注:本文中的com.liferay.portal.kernel.portlet.LiferayPortletRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论