本文整理匯總了Java中javax.portlet.ActionResponse.removePublicRenderParameter方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionResponse.removePublicRenderParameter方法的具體用法?Java ActionResponse.removePublicRenderParameter怎麽用?Java ActionResponse.removePublicRenderParameter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.portlet.ActionResponse
的用法示例。
在下文中一共展示了ActionResponse.removePublicRenderParameter方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: goToModule
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void goToModule(ActionRequest actionRequest, ActionResponse actionResponse)throws Exception {
log.debug("***goToModule***");
actionResponse.removePublicRenderParameter("actionEditingActivity");
actionResponse.removePublicRenderParameter("actionEditingModule");
actionResponse.removePublicRenderParameter("actionCalifications");
actionResponse.removePublicRenderParameter("actionEditingDetails");
ThemeIdEvent themeIdEvent = new ThemeIdEvent();
themeIdEvent.setModuleId(ParamUtil.getLong(actionRequest, "moduleId",0));
themeIdEvent.setThemeId(ParamUtil.getLong(actionRequest, "themeId",1));
actionResponse.setEvent(new QName("http://www.wemooc.com/" , "themeId"), themeIdEvent);
}
示例2: goToActivity
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void goToActivity(ActionRequest request, ActionResponse response) throws IOException{
log.debug("********goToActivityURL********");
String redirect = ParamUtil.get(request, "redirectURL", "");
log.debug("redirect: "+redirect);
response.removePublicRenderParameter("actionEditingActivity");
response.removePublicRenderParameter("actionEditingModule");
response.removePublicRenderParameter("actionCalifications");
response.removePublicRenderParameter("actionEditingDetails");
response.sendRedirect(redirect);
}
示例3: deletemodule
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void deletemodule(ActionRequest actionRequest, ActionResponse actionResponse)throws Exception{
log.debug("*******deletemodule*********");
actionResponse.removePublicRenderParameter("actionEditingActivity");
actionResponse.removePublicRenderParameter("actionEditingModule");
long moduleId = ParamUtil.getLong(actionRequest, "resId",0);
long renderModule = ParamUtil.getLong(actionRequest, "moduleId",0);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
PermissionChecker permissionChecker=themeDisplay.getPermissionChecker();
Module rendModule = ModuleLocalServiceUtil.getPreviusModule(moduleId);
if(Validator.isNull(rendModule)){
rendModule=ModuleLocalServiceUtil.getNextModule(moduleId);
}
if(moduleId>0){
if(permissionChecker.hasPermission(
themeDisplay.getScopeGroupId(),
Module.class.getName(), moduleId,
ActionKeys.DELETE))
{
List<LearningActivity> moduleActivities = LearningActivityLocalServiceUtil.getLearningActivitiesOfModule(moduleId);
for(LearningActivity la : moduleActivities){
deleteActivity(la, themeDisplay, actionRequest, actionResponse);
}
ModuleLocalServiceUtil.deleteModule(moduleId);
SessionMessages.add(actionRequest, "ok-delete-module");
if(moduleId==renderModule){
List<LearningActivity> activities = LearningActivityLocalServiceUtil.getLearningActivitiesOfModule(rendModule.getModuleId());
if(activities!=null && activities.size()>0){
actionResponse.setRenderParameter("actId", String.valueOf(activities.get(0).getActId()));
actionResponse.setRenderParameter("resId", String.valueOf(activities.get(0).getActId()));
}else{
actionResponse.setRenderParameter("actId", "0");
actionResponse.setRenderParameter("resId", "0");
}
actionResponse.setRenderParameter("moduleId", String.valueOf(rendModule.getModuleId()));
}
}
}
}
示例4: deleteactivity
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void deleteactivity(ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
long actId = ParamUtil.getLong(actionRequest, "resId");
long renderActId = ParamUtil.getLong(actionRequest, "actId",0);
long moduleId = ParamUtil.getLong(actionRequest, "moduleId", 0);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
PermissionChecker permissionChecker=themeDisplay.getPermissionChecker();
log.debug("*****deleteactivity*****");
actionResponse.removePublicRenderParameter("actionEditingActivity");
actionResponse.removePublicRenderParameter("actionEditingModule");
if(actId>0){
LearningActivity larn = LearningActivityLocalServiceUtil.getLearningActivity(actId);
if(moduleId<=0){
moduleId = larn.getModuleId();
}
if(permissionChecker.hasPermission(larn.getGroupId(), LearningActivity.class.getName(), larn.getActId(),
ActionKeys.DELETE)|| permissionChecker.hasOwnerPermission(larn.getCompanyId(), LearningActivity.class.getName(), larn.getActId(),larn.getUserId(),
ActionKeys.DELETE))
{
deleteActivity(larn,themeDisplay,actionRequest,actionResponse);
SessionMessages.add(actionRequest, "ok-deleteActivity");
if(actId==renderActId) {
List<LearningActivity> activities = LearningActivityLocalServiceUtil.getLearningActivitiesOfModule(moduleId);
actionResponse.removePublicRenderParameter("actId");
if(activities!=null && activities.size()>0){
actionResponse.setRenderParameter("actId", String.valueOf(activities.get(0).getActId()));
actionResponse.setRenderParameter("resId", String.valueOf(activities.get(0).getActId()));
}else{
actionResponse.setRenderParameter("actId", "0");
actionResponse.setRenderParameter("resId", "0");
actionResponse.setRenderParameter("moduleId", String.valueOf(moduleId));
}
}
/*
if(!LiferayWindowState.EXCLUSIVE.equals(actionRequest.getWindowState())){
actionResponse.sendRedirect(
((LiferayPortletResponse)actionResponse).createRenderURL().toString());
}
*/
}
}
}
示例5: actionBack
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
@ProcessAction(name = ACTION_BACK)
public void actionBack(ActionRequest aReq, ActionResponse aResp) throws IOException {
aResp.removePublicRenderParameter(RENDER_PARAM_STATUS);
aResp.removePublicRenderParameter(RENDER_PARAM_ERROR_MESSAGE);
}
示例6: editDetailsURL
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void editDetailsURL(ActionRequest request, ActionResponse response) throws IOException{
log.debug("********editDetails********");
String redirect = ParamUtil.get(request, "redirectURL", "");
log.debug("redirect: "+redirect);
response.removePublicRenderParameter("actionEditingActivity");
response.sendRedirect(redirect);
}