@RequestMapping(method = {GET, POST}) public String list(@ModelAttribute SearchForm searchForm, Model model) { Page<BusiSalesBrokerage> busiSalesBrokeragePage = busiSalesBrokerageService.findPage(searchForm); model.addAttribute("busiSalesBrokeragePage", busiSalesBrokeragePage); return "busiSalesBrokerage/list"; }
@RequestMapping(value = "/create", method = POST) public String create( @Valid BusiSalesBrokerage busiSalesBrokerage, BindingResult bindingResult, Model model) { if (bindingResult.hasErrors()) { model.addAttribute("busiSalesBrokerage", busiSalesBrokerage); return "busiSalesBrokerage/create"; } busiSalesBrokerageService.save(busiSalesBrokerage); return "redirect:/busiSalesBrokerage/" + busiSalesBrokerage.getBrokId() + "/show"; }
@RequestMapping(value = "/{brokId}/remove", method = GET) public String remove(@PathVariable("brokId") Integer brokId, Model model) { busiSalesBrokerageService.remove(brokId); return "redirect:/busiSalesBrokerage"; }
@RequestMapping(value = "/{brokId}/show", method = GET) public String show(@PathVariable("brokId") Integer brokId, Model model) { BusiSalesBrokerage busiSalesBrokerage = busiSalesBrokerageService.findByPk(brokId); model.addAttribute("busiSalesBrokerage", busiSalesBrokerage); return "busiSalesBrokerage/show"; }
@RequestMapping(value = "/{brokId}/update", method = GET) public String update(@PathVariable("brokId") Integer brokId, Model model) { model.addAttribute("busiSalesBrokerage", busiSalesBrokerageService.findByPk(brokId)); return "busiSalesBrokerage/update"; }