当前位置: 首页>>代码示例>>Java>>正文


Java RenderMapping类代码示例

本文整理汇总了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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:33,代码来源:LoginController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:31,代码来源:ProfileController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:32,代码来源:HeaderController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:34,代码来源:RegistrationController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:32,代码来源:RegistrationController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:30,代码来源:LatestController.java

示例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;
}
 
开发者ID:exo-addons,项目名称:sample-springmvc-portlet,代码行数:27,代码来源:ContactController.java

示例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;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:37,代码来源:AnnotationMethodHandlerAdapter.java

示例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());
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:Portlet20AnnotationControllerTests.java

示例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);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:10,代码来源:Portlet20AnnotationControllerTests.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:38,代码来源:RedirectController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:38,代码来源:MainController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:38,代码来源:ManagementController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:40,代码来源:AdminController.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:39,代码来源:SearchController.java


注:本文中的org.springframework.web.portlet.bind.annotation.RenderMapping类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。