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

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

Introduction

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

Prototype

public ModelAndView(String viewName, HttpStatus status) 

Source Link

Document

Create a new ModelAndView given a view name and HTTP status.

Usage

From source file:infowall.web.spring.ControllerDsl.java

public static ModelAndView render(String viewName, String modelName0, Object modelObject0, String modelName1,
        Object modelObject1) {// ww w.j  av a 2 s.  co m
    return new ModelAndView(viewName, of(modelName0, modelObject0, modelName1, modelObject1));
}

From source file:co.edu.utb.softeng.springtodos.controllers.PagesController.java

@RequestMapping(value = "/")
public ModelAndView getHomePage() {
    Map<String, Object> params = new HashMap<>();
    params.put("apiUrl", apiUrl);
    return new ModelAndView("index", params);
}

From source file:com.gian.message.JsonResponse.java

public ModelAndView asModelAndView() {
    MappingJacksonJsonView jsonView = new MappingJacksonJsonView();
    Map<String, String> transactions = new HashMap();
    for (int i = 0; i < args.length; i += 2) {
        transactions.put(args[i], args[i + 1]);
    }// www.  j a va  2 s.c o m
    return new ModelAndView(jsonView, transactions);
}

From source file:quanlyhocvu.api.web.controller.authority.ManagementUserController.java

@Autowired

@RequestMapping(value = "index")
public @ResponseBody ModelAndView index() {
    Map<String, Object> model = new HashMap<String, Object>();

    return new ModelAndView("authority/management/user/index", model);
}

From source file:com.connect_group.thymeleaf_demo.controller.tdd.MusicController.java

@RequestMapping({ "/tdd/music.html" })
public ModelAndView music() {
    Map<String, Object> model = new HashMap<String, Object>();
    model.put("artists", getArtists());
    return new ModelAndView("tdd/music/music", model);
}

From source file:quanlyhocvu.api.web.controller.admin.AdminController.java

@RequestMapping(value = "home")
public @ResponseBody ModelAndView index(HttpServletRequest request) {
    Map<String, Object> model = new HashMap<>();

    return new ModelAndView("admin/home", model);
}

From source file:infowall.web.spring.ControllerDsl.java

public static ModelAndView render(String viewName, Errors errors, Map<String, Object> modelMap) {

    Map<String, Object> actualModel;
    if (errors.haveOccurred()) {
        actualModel = new ImmutableMap.Builder<String, Object>().putAll(modelMap)
                .put("errors", errors.getMessages()).build();
    } else {//from   w  ww . ja v a2  s .  c om
        actualModel = modelMap;
    }
    return new ModelAndView(viewName, actualModel);
}

From source file:ru.org.linux.spring.boxlets.IbmBoxlet.java

@Override
@RequestMapping("/ibm.boxlet")
protected ModelAndView getData(HttpServletRequest request) {
    return new ModelAndView("boxlets/ibm", null);
}

From source file:ru.org.linux.spring.boxlets.TshirtBoxlet.java

@Override
@RequestMapping("/tshirt.boxlet")
protected ModelAndView getData(HttpServletRequest request) {
    return new ModelAndView("boxlets/tshirt", null);
}

From source file:kz.controller.RegistrationController.java

@RequestMapping(value = "/registration.htm", method = RequestMethod.GET)
public ModelAndView register(Map<String, Object> model) {
    Users user = new Users();
    model.put("user", user);
    ModelAndView mv = new ModelAndView("registration", model);
    return mv;/* w  w  w.j a  v  a 2  s  .  co m*/
}