List of usage examples for org.springframework.ui ModelMap addAttribute
public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue)
From source file:net.groupbuy.controller.admin.ReturnsController.java
/** * /*from w w w . j a v a 2 s . c o m*/ */ @RequestMapping(value = "/view", method = RequestMethod.GET) public String view(Long id, ModelMap model) { model.addAttribute("returns", returnsService.find(id)); return "/admin/returns/view"; }
From source file:net.groupbuy.controller.admin.ReturnsController.java
/** * /* www . ja va 2s. c o m*/ */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Pageable pageable, ModelMap model) { model.addAttribute("page", returnsService.findPage(pageable)); return "/admin/returns/list"; }
From source file:net.groupbuy.controller.admin.ShippingController.java
/** * //from ww w. j a va 2 s .c o m */ @RequestMapping(value = "/view", method = RequestMethod.GET) public String view(Long id, ModelMap model) { model.addAttribute("shipping", shippingService.find(id)); return "/admin/shipping/view"; }
From source file:net.groupbuy.controller.admin.ShippingController.java
/** * /* w w w . jav a 2 s .c o m*/ */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Pageable pageable, ModelMap model) { model.addAttribute("page", shippingService.findPage(pageable)); return "/admin/shipping/list"; }
From source file:org.openmrs.module.bpReadingModule.web.controller.BpReadingModuleManageController.java
@RequestMapping(value = "/module/bpReadingModule/manage", method = RequestMethod.GET) public void manage(ModelMap model) { model.addAttribute("user", Context.getAuthenticatedUser()); }
From source file:org.openmrs.module.facilitydata.web.controller.FacilityDataQuestionTypeListController.java
@RequestMapping("/module/facilitydata/questionType.list") public String listQuestions(ModelMap map) { map.addAttribute("questionTypes", Context.getService(FacilityDataService.class).getAllQuestionTypes()); map.addAttribute("questionTypeBreakdown", Context.getService(FacilityDataService.class).getQuestionTypeBreakdown()); Map<Class<? extends FacilityDataQuestionType>, String> questionDataTypes = new LinkedHashMap<Class<? extends FacilityDataQuestionType>, String>(); questionDataTypes.put(CodedFacilityDataQuestionType.class, "facilitydata.question-type-coded"); questionDataTypes.put(NumericFacilityDataQuestionType.class, "facilitydata.question-type-numeric"); map.addAttribute("questionDataTypes", questionDataTypes); return "/module/facilitydata/questionTypeList"; }
From source file:org.openmrs.module.openhmis.inventory.web.controller.InventoryStockTakePageController.java
@RequestMapping(method = RequestMethod.GET) public void inventory(ModelMap model) throws IOException { model.addAttribute("showStockTakeLink", Context.getAuthenticatedUser() != null && WellKnownOperationTypes.getAdjustment().userCanProcess(Context.getAuthenticatedUser())); model.addAttribute("isOperationNumberAutoGenerated", IdgenHelper.isOperationNumberGenerated()); }
From source file:com.aries.blog.controller.IndexController.java
@RequestMapping(value = "/", method = RequestMethod.GET) public String index(ModelMap model, HttpServletRequest request) { model.addAttribute(PARAM_BASE_URL, getBaseURL(request)); return "index"; }
From source file:com.aries.blog.controller.IndexController.java
@RequestMapping(value = "/userlist", method = RequestMethod.GET) public String userList(ModelMap model, HttpServletRequest request) { model.addAttribute(PARAM_BASE_URL, getBaseURL(request)); return "users"; }
From source file:com.mtech.easyexchange.mvc.exchange.ExchangeController.java
@RequestMapping(value = "/exchange/{currencyOne}/{currencyTwo}", method = RequestMethod.GET) public String index(@PathVariable("currencyOne") Currency buyCurrency, @PathVariable("currencyTwo") Currency sellCurrency, ModelMap map) { map.addAttribute("currencyOne", buyCurrency); map.addAttribute("currencyTwo", sellCurrency); List<Order> buyOrders = orderManager.getBuyOrders(buyCurrency, sellCurrency); List<Order> sellOrders = orderManager.getSellOrders(buyCurrency, sellCurrency); map.addAttribute("buyOrders", buyOrders); map.addAttribute("sellOrders", sellOrders); return "exchange/index"; }