Example usage for org.springframework.web.servlet ModelAndView setViewName

List of usage examples for org.springframework.web.servlet ModelAndView setViewName

Introduction

In this page you can find the example usage for org.springframework.web.servlet ModelAndView setViewName.

Prototype

public void setViewName(@Nullable String viewName) 

Source Link

Document

Set a view name for this ModelAndView, to be resolved by the DispatcherServlet via a ViewResolver.

Usage

From source file:com.ut.healthelink.controller.adminSysHL7Controller.java

/**
 * The '/newHL7Segment' GET request will be used to display the blank new HL7 Segment screen (In a modal)
 *
 *
 * @return   The HL7 Segment blank form page
 *
 * @Objects   An object that will hold all the form fields of a new HL7 Segment 
 *
 *///from  www.ja v a  2  s.  co  m
@RequestMapping(value = "/newHL7Segment", method = RequestMethod.GET)
public @ResponseBody ModelAndView newHL7Segment(@RequestParam(value = "hl7Id", required = true) int hl7Id,
        @RequestParam(value = "nextPos", required = true) int nextPos) throws Exception {

    ModelAndView mav = new ModelAndView();
    mav.setViewName("/administrator/configurations/HL7Segment");

    HL7Segments segmentDetails = new HL7Segments();
    segmentDetails.sethl7Id(hl7Id);
    segmentDetails.setdisplayPos(nextPos);

    mav.addObject("HL7SegmentDetails", segmentDetails);

    return mav;
}

From source file:me.bulat.jivr.webmin.web.root.AppRootController.java

@RequestMapping(value = { "/logout" }, method = { RequestMethod.GET })
public ModelAndView logoutPage() {
    ModelAndView model = new ModelAndView();
    model.addObject("title", "Jivr Web Console Logout page");
    model.addObject("message", "Logout Page!");
    model.setViewName("form/logout");
    return model;
}

From source file:com.MyHistory.Controller.JugadorController.java

@RequestMapping(value = "/FormularioJugador", method = RequestMethod.GET)
public ModelAndView desplegarFormularioJugador() {
    ModelAndView mv = new ModelAndView();
    ServiceJugador servicio = new ServiceJugador();
    ResponseRegisterJugador respuesta = servicio.obtenerDatosRegistroJugador();
    mv.addObject("respuesta", respuesta);
    mv.setViewName("FormularioJugador");
    return mv;/*from  w  w  w.j  a v a  2s .c  o m*/
}

From source file:com.showcase.mobile.BrowseController.java

@RequestMapping("/viewfeeds")
public ModelAndView viewfeeds(HttpServletRequest servletRequest) {
    logger.info("viewfeeds ...");
    ModelAndView mav = new ModelAndView();

    mav.addObject("listFeeds", movieService.findAllFeeds());

    mav.setViewName("viewfeeds");

    return mav;/*from   w w  w  .j ava 2 s.c o  m*/
}

From source file:com.bitranger.parknshop.buyer.controller.ManageFavourite.java

@RequestMapping("/show_shop")
public ModelAndView showShop(HttpServletRequest req, Integer psItemId) {
    PsItem item = psItemDao.findById(psItemId);
    List<PsItem> itemList = psItemDao.findByShop(item.getPsShop().getId(),
            new FetchOption().descending().limit(100));

    for (PsItem psItem : itemList) {
        psItem.setIntroduction(Utility.slice(psItem.getIntroduction(), 40));
    }/*from  ww  w. jav a 2  s  . c o  m*/

    ModelAndView mv = new ModelAndView();
    mv.addObject(VisitorParams.productItemList, itemList);
    mv.addObject(VisitorParams.itemCount, itemList.size());
    mv.setViewName(VisitorView.product);

    List<PsPromotItem> ads = adCenter.itemAdService.forItemList(itemList, 60, null);
    mv.addObject("ad_list", ads);

    return mv;

}

From source file:com.ut.healthelink.controller.adminSysHL7Controller.java

/**
 * The '/newHL7Element' GET request will be used to display the blank new HL7 Segment Element screen (In a modal)
 *
 *
 * @return   The HL7 Segment Element blank form page
 *
 * @Objects   An object that will hold all the form fields of a new HL7 Segment Element 
 *
 *///from w ww.  j a  v  a  2  s . c om
@RequestMapping(value = "/newHL7Element", method = RequestMethod.GET)
public @ResponseBody ModelAndView newHL7Element(@RequestParam(value = "hl7Id", required = true) int hl7Id,
        @RequestParam(value = "segmentId", required = true) int segmentId,
        @RequestParam(value = "nextPos", required = true) int nextPos) throws Exception {

    ModelAndView mav = new ModelAndView();
    mav.setViewName("/administrator/configurations/HL7Element");

    HL7Elements elementDetails = new HL7Elements();
    elementDetails.sethl7Id(hl7Id);
    elementDetails.setsegmentId(segmentId);
    elementDetails.setdisplayPos(nextPos);

    mav.addObject("HL7ElementDetails", elementDetails);

    return mav;
}

From source file:com.anthony.forumspring.controller.AdminController.java

/**
 * Retourne page d 'erreur de connexion//  w w  w.  java2s .  c  o m
 *
 * @return
 */
@RequestMapping(value = "/Admin/FailLog")
public ModelAndView FailLog() {
    ModelAndView MaV = new ModelAndView();

    MaV.setViewName("FailLog");
    return MaV;
}

From source file:com.anthony.forumspring.controller.AdminController.java

/**
 * Renvoi la page d'ajout d une catgorie pour le forum
 *
 * @return/*from ww w.jav a2 s. c o m*/
 */
@RequestMapping(value = "/Admin/NewCategory")
public ModelAndView NewCategory() {
    ModelAndView MaV = new ModelAndView();

    MaV.setViewName("InsertCategorie");
    return MaV;
}

From source file:com.anthony.forumspring.controller.AdminController.java

/**
 * Renvoi la page d'acces refus lorsqu'un utilisateurs n'a pas les droits
 * ncessaires/*w ww  .ja v  a2 s .c o  m*/
 *
 * @return
 */
@RequestMapping(value = "/Admin/AccessDenied", method = RequestMethod.GET)
public ModelAndView AccessDenied() {
    ModelAndView mav = new ModelAndView();
    mav.setViewName("accessDenied");

    return mav;

}

From source file:com.anthony.forumspring.controller.AdminController.java

/**
 *
 * @return/*from   ww w.ja  va 2 s.c  o m*/
 */
@RequestMapping(value = "/Admin**", method = RequestMethod.GET)
public ModelAndView adminPage() {

    ModelAndView MaV = new ModelAndView();

    MaV.setViewName("AdminIndex");
    return MaV;
}