List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:org.openmrs.module.validation.web.controller.ValidationController.java
@RequestMapping(value = "/module/validation/list", method = RequestMethod.GET) public void showList(ModelMap model) { model.addAttribute("validationThreads", getValidationService().getValidationThreads()); }
From source file:net.groupbuy.controller.admin.ProductNotifyController.java
/** * //from w w w. ja va 2s.c o m */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Boolean isMarketable, Boolean isOutOfStock, Boolean hasSent, Pageable pageable, ModelMap model) { model.addAttribute("isMarketable", isMarketable); model.addAttribute("isOutOfStock", isOutOfStock); model.addAttribute("hasSent", hasSent); model.addAttribute("page", productNotifyService.findPage(null, isMarketable, isOutOfStock, hasSent, pageable)); return "/admin/product_notify/list"; }
From source file:org.axonframework.samples.trader.webui.order.OrderBookController.java
@RequestMapping(value = "socket", method = RequestMethod.GET) public String getSocket(ModelMap modelMap) { modelMap.addAttribute("externalServerurl", externalServerUrl); return "orderbook/socket"; }
From source file:com.mohit.program.controller.customer.CustomerController.java
@RequestMapping(method = RequestMethod.GET) public String doGet(ModelMap map) { try {/*from w w w . j a v a 2s.c o m*/ map.addAttribute("products", productDao.getAll(true)); } catch (SQLException | ClassNotFoundException ex) { } return "customer/insert"; }
From source file:org.openmrs.web.controller.maintenance.DatabaseChangesInfoController.java
/** * Called for GET requests only on the databaseChangesInfo page. POST page * requests are invalid and ignored./* www . j a v a 2 s. co m*/ * * @param model * the key value pair that will be accessible from the jsp page * @throws Exception * if there is trouble getting the database changes from * liquibase */ @RequestMapping(method = RequestMethod.GET, value = "admin/maintenance/databaseChangesInfo") public String showPage(ModelMap model) throws Exception { model.addAttribute("databaseChanges", DatabaseUpdater.getDatabaseChanges()); model.addAttribute("updateLogFile", OpenmrsUtil.getApplicationDataDirectory() + DatabaseUpdater.DATABASE_UPDATES_LOG_FILE); // where Spring can find the jsp. /WEB-INF/view is prepended, and ".jsp" // is appended return "/module/legacyui/admin/maintenance/databaseChangesInfo"; }
From source file:com.anuz.dummyapi.controller.DefaultController.java
@RequestMapping(value = "click_me", method = RequestMethod.GET) public ModelMap index1() { ModelMap map = new ModelMap(); map.addAttribute("clickMe", "I'm feeling great"); return map;/* w w w .ja va2 s .com*/ }
From source file:com.it355.petrababic.PetrinController.java
@RequestMapping(value = "/upisPonude", method = RequestMethod.POST) public String upisPonude(@ModelAttribute Ponuda ponuda, ModelMap model) { model.addAttribute("ime", ponuda.getImeIPrezime()); model.addAttribute("kolicina", ponuda.getKolicina()); model.addAttribute("email", ponuda.getEmail()); model.addAttribute("cena", ponuda.getCena()); model.addAttribute("lokacija", ponuda.getLokacija()); model.addAttribute("brojTelefona", ponuda.getBrojTelefona()); ponudaDao.addPonuda();// w ww. ja v a 2 s . c o m loggingDao.logout(); return "ponude"; }
From source file:com.mohit.program.controller.customer.SupplierController.java
@RequestMapping(method = RequestMethod.GET) public String doGet(ModelMap map) { try {// ww w .j a v a 2 s . c om map.addAttribute("products", productDao.getAll(true)); } catch (SQLException | ClassNotFoundException ex) { } return "supplier/insert"; }
From source file:org.openmrs.module.facialrecog.web.controller.FacialRecogManageController.java
@RequestMapping(value = "/module/facialrecog/facehome.list", method = RequestMethod.GET) public void view(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); }
From source file:com.dnn.controller.LoginController.java
@RequestMapping(value = { "/acessoNegado" }, method = RequestMethod.GET) public String acessoNegado(ModelMap model) { model.addAttribute("usuario", pegarUsuario()); return "acessoNegado"; }