本文整理汇总了Java中org.springframework.web.portlet.bind.annotation.RenderMapping类的典型用法代码示例。如果您正苦于以下问题:Java RenderMapping类的具体用法?Java RenderMapping怎么用?Java RenderMapping使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RenderMapping类属于org.springframework.web.portlet.bind.annotation包,在下文中一共展示了RenderMapping类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response,
final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "form";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
}
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例2: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "profile";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
}
this.initData(request, model);
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例3: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response,
final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "header";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
}
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例4: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "../shared/register";
if (this.isLoggedInOrg(request)) {
page = "registerLoggedIn";
}
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
} /*
* else { model.addAttribute("data", new BerliosProject()); }
*/
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例5: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "register";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
} /*
* else { model.addAttribute("data", new BerliosProject()); }
*/
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例6: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "latest";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
}
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例7: displayContactForm
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render method to display the contact form
* @param request
* @param response
* @return
*/
@RenderMapping(params = "action=displayContactForm")
public ModelAndView displayContactForm(RenderRequest request, RenderResponse response) {
ModelAndView modelAndView = new ModelAndView();
// render contactForm.jsp
modelAndView.setViewName("contactForm");
// if an id has been passed in the request, it is an update
// otherwise, it is a creation
String contactId = request.getParameter("id");
if(contactId != null) {
Long id = Long.parseLong(contactId);
// call the service to get the selected contact and pass it to the view
modelAndView.addObject("contact", contactService.getContactById(id));
} else {
modelAndView.addObject("contact", new Contact());
}
return modelAndView;
}
示例8: isHandlerMethod
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
@Override
protected boolean isHandlerMethod(Method method) {
if (this.mappings.containsKey(method)) {
return true;
}
RequestMappingInfo mappingInfo = new RequestMappingInfo();
ActionMapping actionMapping = AnnotationUtils.findAnnotation(method, ActionMapping.class);
RenderMapping renderMapping = AnnotationUtils.findAnnotation(method, RenderMapping.class);
ResourceMapping resourceMapping = AnnotationUtils.findAnnotation(method, ResourceMapping.class);
EventMapping eventMapping = AnnotationUtils.findAnnotation(method, EventMapping.class);
RequestMapping requestMapping = AnnotationUtils.findAnnotation(method, RequestMapping.class);
if (actionMapping != null) {
mappingInfo.initPhaseMapping(PortletRequest.ACTION_PHASE, actionMapping.name(), actionMapping.params());
}
if (renderMapping != null) {
mappingInfo.initPhaseMapping(PortletRequest.RENDER_PHASE, renderMapping.windowState(), renderMapping.params());
}
if (resourceMapping != null) {
mappingInfo.initPhaseMapping(PortletRequest.RESOURCE_PHASE, resourceMapping.value(), new String[0]);
}
if (eventMapping != null) {
mappingInfo.initPhaseMapping(PortletRequest.EVENT_PHASE, eventMapping.value(), new String[0]);
}
if (requestMapping != null) {
mappingInfo.initStandardMapping(requestMapping.value(), requestMapping.method(),
requestMapping.params(), requestMapping.headers());
if (mappingInfo.phase == null) {
mappingInfo.phase = determineDefaultPhase(method);
}
}
if (mappingInfo.phase != null) {
this.mappings.put(method, mappingInfo);
return true;
}
return false;
}
示例9: myHandle
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
@RequestMapping("EDIT")
@RenderMapping
public void myHandle(@RequestParam("param1") String p1, @RequestParam("param2") int p2,
@RequestHeader("header1") long h1, @CookieValue("cookie1") Cookie c1,
RenderResponse response) throws IOException {
response.getWriter().write("test-" + p1 + "-" + p2 + "-" + h1 + "-" + c1.getValue());
}
示例10: myOtherHandle
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
@RequestMapping("EDIT")
@RenderMapping
public String myOtherHandle(TB tb, BindingResult errors, ExtendedModelMap model, MySpecialArg arg) {
TestBean tbReal = (TestBean) tb;
tbReal.setName("myName");
assertTrue(model.get("ITestBean") instanceof DerivedTestBean);
assertNotNull(arg);
return super.myHandle(tbReal, errors, model);
}
示例11: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "redirect";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
}
final ThemeDisplay themeDisplay = (ThemeDisplay) request
.getAttribute(WebKeys.THEME_DISPLAY);
final E_Role role = this.getRole(themeDisplay);
if (role != null) {
m_objLog.info("Got user role " + role.name());
model.addAttribute("redirect", role.getHomeUrl());
}
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例12: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "user";
}
/*
* String uuid = request.getParameter("uuid"); if (uuid != null) {
* m_objLog.info("Got uuid: "+uuid); } else { uuid =
* PortalUtil.getHttpServletRequest(request).getParameter("uuid");
* m_objLog.info("Got uuid from servlet: "+uuid); }
*/
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
} /*
* else { model.addAttribute("data", new BerliosProject()); }
*/
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例13: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
page = "mgmt";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
} /*
* else { model.addAttribute("data", new BerliosProject()); }
*/
/*
* for (E_ConfigCategory cat: E_ConfigCategory.values()) { if
* (cat.getRole().equals(E_Role.MGMT)) {
* model.addAttribute(cat.toString().toLowerCase()+"CfgData",
* CustomServiceHandler.getConfig(cat)); } }
*/
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例14: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
// get IDs of current session
long groupId = getGroupId(request);
long userId = getUserId(request);
// check whether portal already initialized
CustomPortalServiceHandler.checkInit(groupId, userId);
String page = request.getParameter("jspPage");
if (page == null) {
page = "admin";
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
} /*
* else { model.addAttribute("data", new BerliosProject()); }
*/
m_objLog.trace("render::end(" + page + ")");
return page;
}
示例15: render
import org.springframework.web.portlet.bind.annotation.RenderMapping; //导入依赖的package包/类
/**
* Render.
*
* @param request the request
* @param response the response
* @param model the model
* @return the string
*/
@RequestMapping(value = "view")
@RenderMapping
public String render(final RenderRequest request,
final RenderResponse response, final Model model) {
m_objLog.trace("render::start");
String page = request.getParameter("jspPage");
if (page == null) {
final String orgIdStr = request.getParameter("orgId");
final PortletPreferences prefs = request.getPreferences();
final String catIdsStr = prefs.getValue("categoryId", "-1");
if (orgIdStr != null && orgIdStr.trim().length() > 0) {
page = "searchByOrg";
} else if (catIdsStr.equals("-1")) {
page = "searchByType";
} else {
page = "searchByCat";
}
}
final String error = request.getParameter("error");
if (error != null) {
model.addAttribute("error", error);
m_objLog.warn("Handing over error " + error);
final String ePage = request.getParameter("errorPage");
if (ePage != null) {
page = ePage;
}
}
m_objLog.trace("render::end(" + page + ")");
return page;
}