List of usage examples for org.springframework.ui Model addAttribute
Model addAttribute(String attributeName, @Nullable Object attributeValue);
From source file:com.mycompany.loginApp.controller.UserController.java
@RequestMapping(value = "/users", method = RequestMethod.GET) public String getUserList(Model model) { model.addAttribute("userList", userService.getAllUsers()); System.err.println("err " + userService.getAllUsers().size()); return "users"; }
From source file:mum.edu.mstore.controller.AddToCart.java
@RequestMapping(value = "/secure/addtocart", method = RequestMethod.GET) public String addItem(Model model, Product product) { model.addAttribute("categories", categoryService.findAll()); return "addtocart"; }
From source file:org.apache.shiro.samples.sprhib.web.HomeController.java
@RequestMapping("/home") public void viewHome(Model model) { model.addAttribute("users", userService.getAllUsers()); }
From source file:com.kata.anagram.controllers.AnagramController.java
@RequestMapping("/") public String index(Model model) { model.addAttribute("anagram", new AnagramModel()); AnagramHelper anagram = new AnagramHelper(new FileHelper()); return "index"; }
From source file:com.kdubb.socialshowcaseboot.twitter.TwitterTrendsController.java
@RequestMapping(value = "/twitter/trends", method = RequestMethod.GET) public String showTrends(Model model) { model.addAttribute("trends", twitter.searchOperations().getLocalTrends(WORLDWIDE_WOE)); return "twitter/trends"; }
From source file:com.qubit.solution.fenixedu.bennu.webservices.ui.BennuWebservicesController.java
@RequestMapping public String home(Model model) { model.addAttribute("world", "World"); return "bennu-webservices/home"; }
From source file:demo.ui.DemoController.java
@RequestMapping("/") public String home(Model model) { model.addAttribute("demoInput", new DemoInput("Some Value")); return "home"; }
From source file:com.haoocai.jscheduler.web.controller.HomeController.java
@RequestMapping(value = "/", method = RequestMethod.GET) public String dashboard(Model model) { model.addAttribute("now", new Date()); return "index"; }
From source file:com.katropine.admin.controllers.SpringmvcController.java
@RequestMapping("/greeting/{name}") public String greeting(@PathVariable String name, Model model) { model.addAttribute("name", name); return "greeting"; }
From source file:com.ngcamango.rehabcetreweb.presentation.RehabController.java
@RequestMapping(value = "rehab/patients", method = RequestMethod.GET) public String getPatients(Model model) { model.addAttribute("name1", "This is a Patient Name"); return "patients"; }