Ejemplo n.º 1
0
 @RequestMapping("/saveOrUpdatePackageType")
 public String saveOrUpdatePackageType(
     @ModelAttribute("packageType") PackageType packageType, HttpSession session) {
   Boolean isContinue = packageType.getContinue();
   packageType = packageService.saveOrUpdatePackageType(packageType);
   if (isContinue) {
     return "redirect:/package/editPackageType/0";
   }
   return "redirect:/package/packageType";
 }
Ejemplo n.º 2
0
 @RequestMapping("/editPackageType/{id}")
 public String editPackageType(
     @PathVariable Integer id,
     @ModelAttribute PackageType packageType,
     HttpServletRequest request) {
   packageType.setId(null);
   if (id != 0) {
     PackageType tmp = packageService.findPackageTypeByPackageTypeId(id);
     BeanUtils.copyProperties(tmp, packageType);
   }
   return "packageType_edit";
 }