List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:controller.DepartController.java
@RequestMapping() public String indexdp(ModelMap model) { model.addAttribute("depart", new Depart()); model.addAttribute("departs", getDeparts()); return "admin/depart"; }
From source file:id.go.kemdikbud.tandajasa.controller.PegawaiController.java
@RequestMapping("/pegawai/list") public ModelMap daftarPegawai(@RequestParam(required = false) String search) { System.out.println("Daftar Pegawai"); List<Pegawai> data = new ArrayList<Pegawai>(); data.addAll(pegawaiDao.cariSemuaPegawai(search)); ModelMap mm = new ModelMap(); mm.addAttribute("daftarPegawai", data); return mm;//from w ww . ja v a 2 s.c om }
From source file:net.groupbuy.controller.admin.AttributeController.java
/** * /*from w w w . j a v a 2 s . c o m*/ */ @RequestMapping(value = "/add", method = RequestMethod.GET) public String add(ModelMap model) { model.addAttribute("productCategoryTree", productCategoryService.findTree()); model.addAttribute("attributeValuePropertyCount", Product.ATTRIBUTE_VALUE_PROPERTY_COUNT); return "/admin/attribute/add"; }
From source file:net.groupbuy.controller.admin.ConsultationController.java
/** * ?/*from w w w. ja va2 s . co m*/ */ @RequestMapping(value = "/reply", method = RequestMethod.GET) public String reply(Long id, ModelMap model) { model.addAttribute("consultation", consultationService.find(id)); return "/admin/consultation/reply"; }
From source file:net.groupbuy.controller.admin.ConsultationController.java
/** * /* w w w . ja v a 2 s . c om*/ */ @RequestMapping(value = "/edit", method = RequestMethod.GET) public String edit(Long id, ModelMap model) { model.addAttribute("consultation", consultationService.find(id)); return "/admin/consultation/edit"; }
From source file:net.groupbuy.controller.admin.ConsultationController.java
/** * //ww w . ja v a 2 s . c om */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Pageable pageable, ModelMap model) { model.addAttribute("page", consultationService.findPage(null, null, null, pageable)); return "/admin/consultation/list"; }
From source file:org.openmrs.module.clinicalsummary.web.controller.reminder.ReminderListController.java
@RequestMapping(method = RequestMethod.POST) public @ResponseBody List<String[]> processSubmit( final @RequestParam(required = true, value = "displayType") ReportDisplayType displayType, final @RequestParam(required = false, value = "locations") Collection<String> locationNames, final @RequestParam(required = false, value = "tokens") Collection<String> tokens, final @RequestParam(required = false, value = "startTime") Date startDate, final @RequestParam(required = false, value = "endTime") Date endDate, final ModelMap map) { map.addAttribute("displayTypes", Arrays.asList(ReportDisplayType.DISPLAY_REPORT_BY_PROVIDER, ReportDisplayType.DISPLAY_REPORT_BY_LOCATION)); Map<String, Collection<OpenmrsObject>> restrictions = new Hashtable<String, Collection<OpenmrsObject>>(); restrictions.put("location", WebUtils.getOpenmrsObjects(locationNames, Location.class)); Collection<String> groupingProperties = getGroupingProperties(displayType); ReminderService service = Context.getService(ReminderService.class); List<Object[]> objects = service.aggregateReminders(restrictions, groupingProperties, startDate, endDate); return serialize(objects); }
From source file:org.openmrs.module.pdmp_query.web.controller.PDMPQueryManageController.java
@RequestMapping(value = "/module/pdmp_query/manage.form", method = RequestMethod.GET) public void manage(ModelMap model) { Config c = Context.getService(ConfigService.class).getConfig(); model.addAttribute("user", Context.getAuthenticatedUser()); model.addAttribute("pdmpURL", c.getUrl()); model.addAttribute("pdmpUID", c.getUser()); }
From source file:com.urservices.urerp.ecole.adresse.controller.AdresseController.java
@RequestMapping(value = "/new", method = RequestMethod.GET) public String newAction(ModelMap model) { Adresse adresse = new Adresse(); model.addAttribute("adresse", adresse); return "adresse/new"; }
From source file:controller.FeedbackControllerManager.java
@RequestMapping(value = "/edit/{id}", method = RequestMethod.GET) public String editFeedback(@PathVariable(value = "id") int id, ModelMap mm) { Feedback feed = feedModel.getByID(id); mm.addAttribute("feed", feed); return "editFeedback"; }