List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:unic.mentoring.springmvc.ctrl.CatalogCtrl.java
@RequestMapping("/catalog") public String catalog(ModelMap model) { model.addAttribute("categories", catalogFacade.getRootCategories()); return "catalog"; }
From source file:unic.mentoring.springmvc.ctrl.CatalogCtrl.java
@RequestMapping("/category/{id}") public String category(@PathVariable("id") Integer id, ModelMap model) { model.addAttribute("category", catalogFacade.getCategoryById(id)); return "category"; }
From source file:unic.mentoring.springmvc.ctrl.CatalogCtrl.java
@RequestMapping("/product/{id}") public String product(@PathVariable("id") Integer id, ModelMap model) { model.addAttribute("product", catalogFacade.getProductById(id)); return "product"; }
From source file:com.spring.tutorial.formHandlers.UploadController.java
@RequestMapping(value = "/my-drive/upload", method = RequestMethod.GET) public String upload(ModelMap map) { map.addAttribute("title", "upload"); return "mydrive/upload"; }
From source file:com.wesley_acheson.example.PageController.java
@RequestMapping public String doContents(@BackingBean Page bean, ModelMap modelMap) { modelMap.addAttribute("page", bean); return "/page.jsp"; }
From source file:org.jasig.schedassist.web.admin.AdminHomeController.java
@RequestMapping("/admin/index.html") public String getAdminHome(ModelMap model) { model.addAttribute("runScheduledTasks", System.getProperty("org.jasig.schedassist.runScheduledTasks", "true")); return "admin/home"; }
From source file:org.jasig.schedassist.web.profiles.ProfileSearchController.java
@RequestMapping("/public/index.html") protected String displaySearchForm(ModelMap model) { model.addAttribute("sitesearchValue", sitesearchValue); return VIEW_NAME; }
From source file:org.openmrs.module.dms.web.controller.DmsManageController.java
@RequestMapping(value = "/module/dms/manage", method = RequestMethod.GET) public void manage(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); }
From source file:org.openmrs.module.jpaannotationtest.web.controller.JPAAnnotationTestManageController.java
@RequestMapping(value = "/module/jpaannotationtest/manage", method = RequestMethod.GET) public void manage(final ModelMap model) { model.addAttribute("what", Context.getService(JPAAnnotationTestService.class).get().getName()); }
From source file:org.openmrs.module.OT.web.controller.OperationTheatreManageController.java
@RequestMapping(value = "/module/OT/manage", method = RequestMethod.GET) public void manage(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); }