Example usage for org.springframework.ui ModelMap addAttribute

List of usage examples for org.springframework.ui ModelMap addAttribute

Introduction

In this page you can find the example usage for org.springframework.ui ModelMap addAttribute.

Prototype

public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue) 

Source Link

Document

Add the supplied attribute under the supplied name.

Usage

From source file:org.openmrs.module.conseildep.web.controller.GenerateuridManageController.java

@RequestMapping(value = "/module/conseildep/manage")
public void manage(ModelMap model) {
    model.addAttribute("user", Context.getAuthenticatedUser());
}

From source file:org.openmrs.module.conseildep.web.controller.GenerateuridManageController.java

@RequestMapping(value = "/module/conseildep/manage1")
public void manage1(ModelMap model) {
    model.addAttribute("user", Context.getAuthenticatedUser());
}

From source file:org.openmrs.module.conseildep.web.controller.GenerateuridManageController.java

@RequestMapping(value = "/module/conseildep/manage2")
public void manage2(ModelMap model) {
    model.addAttribute("user", Context.getAuthenticatedUser());
}

From source file:org.openmrs.module.conseildep.web.controller.GenerateuridManageController.java

@RequestMapping(value = "/module/conseildep/manage3")
public void manage3(ModelMap model) {
    model.addAttribute("user", Context.getAuthenticatedUser());
}

From source file:org.openmrs.module.querybrowser.web.controller.QueryBrowserManageController.java

@RequestMapping(value = "/module/querybrowser/manage", method = RequestMethod.GET)
public void manage(final ModelMap model) {
    model.addAttribute("user", Context.getAuthenticatedUser());
}

From source file:thymeleafsandbox.springjsp.web.controller.jsp.JspExp.java

@RequestMapping("/jsp/exp")
public String showExp(final ModelMap modelMap) {
    modelMap.addAttribute("aMap", Collections.singletonMap("aKey", "ONE VALUE!"));
    return "jsp/exp";
}

From source file:thymeleafsandbox.springjsp.web.controller.thymeleaf.ThymeleafExp.java

@RequestMapping("/thymeleaf/exp")
public String showExp(final ModelMap modelMap) {
    modelMap.addAttribute("aMap", Collections.singletonMap("aKey", "ONE VALUE!"));
    return "thymeleaf/exp";
}

From source file:com.havoc.hotel.admin.controller.CheckoutController.java

@RequestMapping(method = RequestMethod.GET)
public String index(ModelMap map) throws SQLException {
    map.addAttribute("Checkout", checkoutDAO.getALL());
    return "admin/checkin/index";
}

From source file:com.test.springmvc.springmvcproject.HelloController.java

@RequestMapping(value = "/print", method = RequestMethod.GET)
public String printWelcome(ModelMap model) {
    model.addAttribute("message", "Hello from spring MVC !");
    return "hello";
}

From source file:com.test.springmvc.springmvcproject.HelloController.java

@RequestMapping(value = "/SayHello", method = RequestMethod.GET)
public String sayHelloToUser(ModelMap model) {
    model.addAttribute("helloMessage", "Hello you !");
    return "sayHello";
}