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(View view, String modelName, Object modelObject) 

Source Link

Document

Convenient constructor to take a single model object.

Usage

From source file:com.anuk.crud.controllers.EmployeeController.java

@RequestMapping("/empform")
public ModelAndView showform() {
    return new ModelAndView("empform", "command", new Employee());
}

From source file:com.biendltb.controller.Home.java

@RequestMapping("/")
public ModelAndView home() {
    String message = "<h1>Hello Bien</h1>";

    return new ModelAndView("index", "message", message);
}

From source file:controller.IndexController.java

@RequestMapping(method = RequestMethod.GET)
public ModelAndView makeAppointment() {

    return new ModelAndView("index", "weatherDescription", service.getWeather());
}

From source file:ui.controller.ApplicationController.java

@RequestMapping("/")
protected ModelAndView getLogin() throws Exception {
    return new ModelAndView("Login", "messages", "");
}

From source file:ui.controller.LocationOverviewController.java

@RequestMapping("/locationOverview")
protected ModelAndView getLocations() {
    ArrayList<Location> locations = new ArrayList<Location>();
    locations.add(new Location(1, "KHL", new Geolocation(51, 51)));
    locations.add(new Location(2, "KUL", new Geolocation(51, 51)));

    return new ModelAndView("locationOverview", "locations", locations);
}

From source file:com.github.cellizz.webprojectmvc.controller.PersonController.java

@RequestMapping("/personslist")
public ModelAndView getPersons() {
    Iterable<Person> findAll = personRepository.findAll();
    return new ModelAndView("personlist", "persons", findAll);
}

From source file:org.bgrimm.report.web.MessageController.java

public ModelAndView list() {
    List messages = new ArrayList();
    return new ModelAndView("messages/list", "messages", messages);
}

From source file:psiprobe.controllers.apps.ListApplicationResourcesController.java

@Override
protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    return new ModelAndView(getViewName(), "resources", getContainerWrapper().getResourceResolver()
            .getApplicationResources(context, getContainerWrapper()));
}

From source file:com.luis.controllers.PuestosController.java

@RequestMapping(value = "/puestos.htm")
public ModelAndView handleRequest(HttpServletRequest hsr, HttpServletResponse hsr1) throws Exception {
    Collection<Puesto> l = mp.getAllPuesto();

    return new ModelAndView("puestos", "puestos", l);

}

From source file:com.googlecode.psiprobe.controllers.apps.ListApplicationResourcesController.java

protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
    return new ModelAndView(getViewName(), "resources", getContainerWrapper().getResourceResolver()
            .getApplicationResources(context, getContainerWrapper()));
}