List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:org.openmrs.module.openhmis.cashier.web.controller.CashPointsController.java
@RequestMapping(method = RequestMethod.GET) public void cashPoints(ModelMap model) throws IOException { model.addAttribute("modelBase", "openhmis.cashier.cashPoint"); }
From source file:org.openmrs.module.openhmis.cashier.web.controller.PaymentModesController.java
@RequestMapping(method = RequestMethod.GET) public void paymentModes(ModelMap model) throws IOException { model.addAttribute("modelBase", "openhmis.cashier.paymentMode"); }
From source file:com.base.controller.CourseController.java
@RequestMapping(value = "/admin/course", method = RequestMethod.GET) public String renderCourse(ModelMap map) { map.addAttribute("course", new Course()); try {//from w ww . j av a 2 s . c om map.addAttribute("courses", CourseDAO.getCourses()); } catch (Exception e) { e.printStackTrace(); } return "course"; }
From source file:com.mtech.easyexchange.mvc.user.LoginController.java
@RequestMapping(value = "/welcome", method = RequestMethod.GET) public String welcome(@ActiveUser User user, ModelMap map) { map.addAttribute("user", user); return "user/welcome"; }
From source file:org.openmrs.module.openhmis.inventory.web.controller.ItemAttributeTypesController.java
@RequestMapping(method = RequestMethod.GET) public void render(ModelMap model) throws IOException { model.addAttribute("modelBase", "openhmis.inventory.admin.item.attribute.types"); }
From source file:com.base.controller.UserController.java
@RequestMapping(value = "/admin/user", method = RequestMethod.GET) public String renderCourse(ModelMap map) { map.addAttribute("user", new User()); try {/* ww w. j a va 2 s. co m*/ map.addAttribute("courses", UserDAO.getUsers()); } catch (Exception e) { e.printStackTrace(); } return "user"; }
From source file:com.portal.controller.WelcomeController.java
@RequestMapping("/") public String showIndexPage(ModelMap model) { model.addAttribute("employes", portalService.getAllEmployes()); return "index"; }
From source file:com.anuz.dummyclient.controller.api.ClientController.java
@RequestMapping(value = "/html_update/{clientId}", method = RequestMethod.GET) public ResponseEntity getHTMLUpdates(@PathVariable("clientId") int clientId) { System.out.println("Check"); String url = "http://192.168.0.112:8080/DummyAPI/api/v1/users/" + clientId + "/html/latest"; ModelMap map = new ModelMap(); map.addAttribute("updates", clientService.htmtUpdates(url)); return new ResponseEntity(map, HttpStatus.OK); }
From source file:com.gotour.controllers.HomeController.java
@RequestMapping(value = "/", method = RequestMethod.GET) public String index(ModelMap model) { model.addAttribute("citySearch", new City()); model.addAttribute("cityList", cityService.getCities()); model.addAttribute("reviews", ts.getLastReviews(3)); return "index"; }
From source file:com.mohit.program.controller.product.DisplayController.java
@RequestMapping(method = RequestMethod.GET) public String doGet(ModelMap map) { try {//w w w .j ava 2s. co m map.addAttribute("product", productDao.getAll(false)); } catch (SQLException | ClassNotFoundException ex) { } return "product/display"; }