List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:com.havoc.hotel.controller.RoomController.java
@RequestMapping(method = RequestMethod.GET) public String index(ModelMap map, HttpServletRequest request) throws SQLException { map.addAttribute("Room", roomDAO.getALL()); return "room/index"; }
From source file:net.mooko.moosm.demo.DashboardController.java
@RequestMapping("dashboard") public String index(ModelMap model, Integer num) { System.out.println("dashboard"); model.addAttribute("demo", ""); return "dashboard"; }
From source file:com.demo.controller.home.HelloWorldController.java
@RequestMapping("/hello") public String sayHello(ModelMap map) { System.out.println("say Hello "); map.addAttribute("name", " World!"); return "/hello"; }
From source file:nl.surfnet.coin.teams.interceptor.FeatureInterceptor.java
@Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { if (modelAndView != null) { ModelMap map = modelAndView.getModelMap(); map.addAttribute("displayExternalTeams", displayExternalTeams); map.addAttribute("displayExternalTeamMembers", displayExternalTeamMembers); map.addAttribute("displayAddExternalGroupToTeam", displayAddExternalGroupToTeam); }//from w w w. jav a 2 s .c o m super.postHandle(request, response, handler, modelAndView); }
From source file:com.mtt.myapp.operation.cotroller.SystemConfigController.java
/** * Open the system configuration editor. * * @param model model/*from w w w.ja v a2s .c om*/ * @return operation/system_config */ @RequestMapping("") public String getOne(ModelMap model) { model.addAttribute("content", systemConfigService.getOne()); return "operation/system_config"; }
From source file:br.edu.ifrs.restinga.modulorh.controle.ServidorController.java
@RequestMapping("/servidor/editarServidor") public String paginaDeEdicao(Integer servidorId, ModelMap model) { model.addAttribute("servidor", servidorDAO.carregar(servidorId)); return "servidor/editaServidor"; }
From source file:com.github.britter.springbootherokudemo.endpoint.HomeController.java
@RequestMapping(method = RequestMethod.GET) public String home(ModelMap model) { List<Room> rooms = repository.findAll(); model.addAttribute("rooms", rooms); return "home"; }
From source file:com.havoc.hotel.admin.controller.CustomerAdminController.java
@RequestMapping(method = RequestMethod.GET) public String index(ModelMap map) throws SQLException { map.addAttribute("Customer", customerDAO.getALL()); return "admin/customer/index"; }
From source file:com.pkrete.locationservice.admin.controller.mvc.AddSubjectMatterController.java
@RequestMapping(method = RequestMethod.GET) public String initializeForm(HttpServletRequest request, ModelMap model) { model.addAttribute("languages", getOwner(request).getLanguages()); model.put("subject", new SubjectMatter()); return "add_subjectmatter"; }
From source file:de.berlios.jhelpdesk.web.manager.ticketcategory.TicketCategoryEditController.java
@RequestMapping(value = "/manage/category/{id}/edit.html", method = RequestMethod.GET) public String prepareForm(@PathVariable("id") Long catId, ModelMap map) { map.addAttribute("category", categoryDAO.getById(catId)); return MANAGE_TICKET_CATEGORY_EDIT; }