List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:org.jasig.schedassist.web.admin.OracleSessionPoolAdminController.java
/** * /*from w w w . j a v a2 s.c o m*/ * @param model * @return */ @RequestMapping public String showPoolStatus(ModelMap model) { model.addAttribute("numActive", oracleSessionPool.getNumActive()); model.addAttribute("numIdle", oracleSessionPool.getNumIdle()); return "admin/oracle-session-pool-status"; }
From source file:com.company.controller.admin.StudentController.java
@RequestMapping(method = RequestMethod.GET) public String index(ModelMap map) throws SQLException { map.addAttribute("students", studentService.getAll()); return "admin/student/index"; }
From source file:de.berlios.jhelpdesk.web.HelpViewController.java
@RequestMapping(value = "/help/kb/search.html", method = RequestMethod.GET) public String knowledgeBaseSearch(@RequestParam("query") String query, ModelMap map) { map.addAttribute("result", luceneIndexer.search(query)); return HELP_KB_SEARCH_RESULT; }
From source file:ru.codemine.ccms.router.ReportsRouter.java
@Secured("ROLE_OFFICE") @RequestMapping(value = "/reports/shopproviders", method = RequestMethod.GET) public String getShopProvidersReport(ModelMap model) { model.addAllAttributes(utils.prepareModel()); model.addAttribute("allshops", shopService.getAll()); return "reports/shopprov"; }
From source file:abid.password.springmvc.controller.LoginController.java
@RequestMapping(method = RequestMethod.GET, value = "/login") public String handleGetLogin(ModelMap model) { List<User> users = userService.getUsers(); model.addAttribute("users", users); return "login"; }
From source file:com.github.britter.springbootherokudemo.HomeController.java
@RequestMapping(method = RequestMethod.GET) public String home(ModelMap model) { List<Record> records = repository.findAll(); model.addAttribute("records", records); model.addAttribute("insertRecord", new Record()); return "home"; }
From source file:net.groupbuy.controller.admin.FriendLinkController.java
/** * /*from w w w . j av a 2s . c o m*/ */ @RequestMapping(value = "/add", method = RequestMethod.GET) public String add(ModelMap model) { model.addAttribute("types", Type.values()); return "/admin/friend_link/add"; }
From source file:net.groupbuy.controller.admin.FriendLinkController.java
/** * /*from ww w .j a va2 s . c o m*/ */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Pageable pageable, ModelMap model) { model.addAttribute("page", friendLinkService.findPage(pageable)); return "/admin/friend_link/list"; }
From source file:net.groupbuy.controller.admin.ShippingMethodController.java
/** * //from w w w. j av a 2 s .c o m */ @RequestMapping(value = "/add", method = RequestMethod.GET) public String add(ModelMap model) { model.addAttribute("deliveryCorps", deliveryCorpService.findAll()); return "/admin/shipping_method/add"; }
From source file:net.groupbuy.controller.admin.ShippingMethodController.java
/** * /*from w w w.ja v a2s. co m*/ */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Pageable pageable, ModelMap model) { model.addAttribute("page", shippingMethodService.findPage(pageable)); return "/admin/shipping_method/list"; }