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:org.dspace.app.webui.cris.controller.admin.DOAdminController.java

@Override
public ModelAndView handleRequest(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception {

    Map<String, Object> model = new HashMap<String, Object>();
    model.put("path", Utils.getAdminSpecificPath(arg0, null));
    return new ModelAndView(getViewName(), model);
}

From source file:com.wuliu.controller.Login.java

@RequestMapping("/loginpage.html")
public ModelAndView load() {
    Map<String, Object> ret = new HashMap<String, Object>();
    ret.put("page", "loginpage");
    return new ModelAndView("loginpage", ret);
}

From source file:org.parancoe.basicWebApp.controllers.ItalyController.java

@RequestMapping
public ModelAndView index(HttpServletRequest req, HttpServletResponse res) {
    return new ModelAndView("italy/index", null);
}

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

@RequestMapping(value = "index")
public @ResponseBody ModelAndView index(HttpServletRequest request) {
    Map<String, Object> model = new HashMap<>();
    List<UserDTO> users = mongoService.getAllUser();
    model.put("users", users);
    return new ModelAndView("admin/management/role/index", model);
}

From source file:com.infinity.controller.PdfController.java

@RequestMapping(value = "/generate/pdf", method = RequestMethod.GET)
ModelAndView generatePdf(HttpServletRequest request, HttpServletResponse response) throws Exception {

    //        Employee employee = new Employee();
    //        employee.setFirstName("Yashwant");
    //        employee.setLastName("Chavan");

    Map map = new HashMap<>();
    ArrayList<String> word = new ArrayList<>();
    word.add("toto");
    word.add("titi");
    map.put("wordList", word);

    return new ModelAndView("pdfView", map);

}

From source file:org.intalio.tempo.uiframework.actions.OneTaskAction.java

@Override
public ModelAndView execute() {
    return new ModelAndView(Constants.ONE_TASK_VIEW, createModel());
}

From source file:de.dentrassi.osgiee.web4.FormController.java

@RequestMapping(method = RequestMethod.GET)
public ModelAndView show() {
    final Map<String, Object> model = new HashMap<>();
    model.put("command", new FormData());
    return new ModelAndView("form", model);
}