Example usage for org.springframework.ui Model addAttribute

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

Introduction

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

Prototype

Model addAttribute(String attributeName, @Nullable Object attributeValue);

Source Link

Document

Add the supplied attribute under the supplied name.

Usage

From source file:club.sportsnote.security.controller.MainController.java

@RequestMapping("/login-error")
public String loginError(Model model) {
    model.addAttribute("loginError", true);
    return "login";
}

From source file:com.katropine.admin.controllers.SecurityNavigationController.java

@RequestMapping(value = { "/", "/login" }, method = RequestMethod.GET)
public String loginForm(Model model) {
    model.addAttribute("message", "Login...");
    return "login";
}

From source file:com.katropine.admin.controllers.SecurityNavigationController.java

@RequestMapping(value = "/error-login", method = RequestMethod.GET)
public String invalidLogin(Model model) {
    model.addAttribute("message", "Wrong Username/Password combination");
    return "login";
}

From source file:com.katropine.admin.controllers.SecurityNavigationController.java

@RequestMapping(value = { "/logout" }, method = RequestMethod.GET)
public String logout(Model model) {
    model.addAttribute("message", "Login...again :)");
    return "login";
}

From source file:com.mum.controller.CallTestPage.java

public String showTestPage(Model model) {
    System.out.println("Message");
    model.addAttribute("message", "this is message");
    return "test";
}

From source file:com.sishuok.chapter2.web.controller.UserController.java

@RequestMapping("/user")
public String hello(Model model) {
    userService.sayHello();/*from   w  w w . j a v  a 2s .co  m*/
    model.addAttribute("msg", "hello world");

    return "user/hello";
}

From source file:controllers.proveedoresController.java

@RequestMapping(value = "/proveedoresCRUD_consultarTodos.htm", method = RequestMethod.GET)
public String consultarServicios(Model model) {
    model.addAttribute("proveedores", proveedorDAO.obtenerProveedores());
    return "proveedores";
}

From source file:edu.lfa.webapp.controller.CustomerController.java

@RequestMapping(value = "/add", method = RequestMethod.GET)
public String add(Model model) {
    model.addAttribute("users", userDAO.getAll());
    return "admin/customer/add";

}

From source file:jungle.controller.FilmController.java

@RequestMapping(value = "ajouter", method = RequestMethod.GET)
public String ajouter(Model model) {

    model.addAttribute("film", new Film());

    return "/film/ajouter";
}

From source file:jungle.controller.FilmController.java

@RequestMapping(value = "lister", method = RequestMethod.GET)
public String lister(Model model) {

    model.addAttribute("films", filmCrudService.findAll());

    return "/film/lister";
}