List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:net.acesinc.util.test.service1.web.HomepageController.java
@RequestMapping(value = { "/", "/index" }, method = RequestMethod.GET) public String getHomepage(ModelMap model, Principal p) { model.addAttribute("pageName", "Home"); return "index"; }
From source file:net.acesinc.util.test.service1.web.Test2Controller.java
@RequestMapping(value = { "/test2" }, method = RequestMethod.GET) public String getPage(ModelMap model, Principal p) { model.addAttribute("pageName", "test2"); return "test2"; }
From source file:net.groupbuy.controller.shop.FriendLinkController.java
/** * //w w w. j a v a2 s .c o m */ @RequestMapping(method = RequestMethod.GET) public String index(ModelMap model) { model.addAttribute("textFriendLinks", friendLinkService.findList(Type.text)); model.addAttribute("imageFriendLinks", friendLinkService.findList(Type.image)); return "/shop/friend_link/index"; }
From source file:com.mohit.program.controller.enquiry.PatientController.java
@RequestMapping(method = RequestMethod.GET) public String doGet(ModelMap map) { map.addAttribute("disease", diseaseDao.getAll()); map.addAttribute("medicine", medicineDao.getAll()); return "enquiry/add"; }
From source file:org.openmrs.module.dataaggregation.web.controller.QueriesController.java
@RequestMapping(value = "/module/dataaggregation/queries", method = RequestMethod.GET) public void manage(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); }
From source file:org.openmrs.module.pregnancycdss.web.controller.PregnancyCDSSManageController.java
@RequestMapping(value = "/module/pregnancycdss/manage", method = RequestMethod.GET) public void manage(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); log.debug("semteacher: 0. Try to get symptcategorylist from db: invoke service call..."); model.addAttribute("symptcategorylist", Context.getService(pregnancycdssserviceService.class).getAllSymptCategories()); }
From source file:net.acesinc.util.test.service1.web.DontCacheController.java
@RequestMapping(value = { "/dontcache" }, method = RequestMethod.GET) public @ResponseBody String getPage(ModelMap model, Principal p) { model.addAttribute("pageName", "dontcache"); return RandomStringUtils.randomAlphanumeric(15); }
From source file:org.openmrs.module.facilitydata.web.controller.FacilityDataQuestionListController.java
@RequestMapping("/module/facilitydata/question.list") public String listQuestions(ModelMap map) { map.addAttribute("questions", Context.getService(FacilityDataService.class).getAllQuestions()); map.addAttribute("questionBreakdown", Context.getService(FacilityDataService.class).getQuestionBreakdown()); return "/module/facilitydata/questionList"; }
From source file:org.openmrs.module.conceptnamefinder.web.controller.ConceptNameFinderManageController.java
@RequestMapping(value = "/module/conceptnamefinder/manage", method = RequestMethod.GET) public void manage(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); }
From source file:org.openmrs.web.controller.maintenance.SystemInformationController.java
/** * Called for GET requests only on the systemInfo page. * /*from www . j a v a 2 s . com*/ * @param model * map * @should add openmrs information attribute to the model map * @should add java runtime information attribute to the model map * @should add database information attribute to the model map * @should add memory information attribute to the model map * @should add module information attribute to the model map */ @RequestMapping(method = RequestMethod.GET, value = "admin/maintenance/systemInfo") public String showPage(ModelMap model) { model.addAttribute("systemInfo", Context.getAdministrationService().getSystemInformation()); return "/module/legacyui/admin/maintenance/systemInfo"; }