List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:com.citrix.cpbm.portal.fragment.controllers.AbstractStaticPagesController.java
@RequestMapping(value = "/pages/tnc", method = RequestMethod.GET) public String termsAndConditions(ModelMap map) { logger.debug("### In termsAndConditions() start method..."); map.addAttribute("tenant", getTenant()); logger.debug("### In termsAndConditions() end"); return "main.termsAndConditions"; }
From source file:org.openmrs.module.spike1.web.controller.Spike1ManageController.java
@RequestMapping(value = "/module/spike1/manage", method = RequestMethod.GET) public void manage(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); }
From source file:net.groupbuy.controller.admin.SpecificationController.java
/** * /*from w ww . java 2 s.c om*/ */ @RequestMapping(value = "/add", method = RequestMethod.GET) public String add(ModelMap model) { model.addAttribute("types", Type.values()); return "/admin/specification/add"; }
From source file:net.groupbuy.controller.admin.SpecificationController.java
/** * //from w ww . j a v a 2 s .com */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Pageable pageable, ModelMap model) { model.addAttribute("page", specificationService.findPage(pageable)); return "/admin/specification/list"; }
From source file:org.ngrinder.user.controller.UserSignUpController.java
/** * Get user list that current user will be shared, excluding current user. * * @param user current user/* www . j a v a 2 s. c om*/ * @param model model */ protected void attachCommonAttribute(User user, ModelMap model) { model.addAttribute("userSecurityEnabled", config.isUserSecurityEnabled()); }
From source file:com.apress.progwt.server.web.controllers.SearchController.java
@RequestMapping(method = RequestMethod.GET) public ModelMap searchHandler(HttpServletRequest req, @RequestParam(value = "searchString", required = false) String searchString, @RequestParam(value = "message", required = false) String message) throws SiteException { ModelMap rtn = ControllerUtil.getModelMap(req, userService); rtn.addAttribute("message", message); addResults(rtn, new SearchCommand(searchString)); return rtn;//www .j a v a 2 s. c om }
From source file:com.trenako.web.controllers.HomeController.java
@RequestMapping(value = { "/", "/home" }, method = RequestMethod.GET) public String home(ModelMap model) { Account user = loggedUser();//from w ww. ja va 2 s . c o m model.addAttribute("content", service.getHomeContent(user)); if (user != null) { model.addAttribute(user); } return "home/index"; }
From source file:net.groupbuy.controller.admin.SpecificationController.java
/** * //w w w . jav a 2s . co m */ @RequestMapping(value = "/edit", method = RequestMethod.GET) public String edit(Long id, ModelMap model) { model.addAttribute("types", Type.values()); model.addAttribute("specification", specificationService.find(id)); return "/admin/specification/edit"; }
From source file:com.apress.progwt.server.web.controllers.SupervisorController.java
@RequestMapping("/secure/extreme/scripts_action_search_index.html") public ModelAndView scriptsActionHandler(HttpServletRequest req, ModelMap map) { searchService.reindex();//from ww w .j a v a2 s .co m map.addAttribute("message", "Re-Indexing begun"); return scriptsHandler(req, map); }
From source file:com.havoc.hotel.admin.controller.BookingAdminController.java
@RequestMapping(method = RequestMethod.GET) public String index(ModelMap map) throws SQLException { map.addAttribute("Booking", bookingDAO.getALL()); return "admin/booking/index"; }