return "/employee/PersonalMattersCostDetail";
}
UserInfoDetails user =
(UserInfoDetails)SecurityContextHolder.getContext().getAuthentication().getPrin
cipal();
service.saveCost(form,employeeid,user.getUserid());
return
"redirect:/employee/"+employeeid+"/PersonalMattersCost.html";
}
@RequestMapping(value = "/delete/{expensetaxid}",
method=RequestMethod.POST)
public String doDelete(@Valid PersonalMattersCostForm form,
BindingResult result,@PathVariable Integer employeeid,@PathVariable Integer
expensetaxid){
service.deleteInfo(form, expensetaxid);
return
"redirect:/employee/"+employeeid+"/PersonalMattersCost.html";
}
}
PersonalMattersCostForm
public class PersonalMattersCostForm {
@NotEmpty
private String costtype;
@NotNull
private BigDecimal costmoney;
@DateTimeFormat(iso = ISO.DATE)
private Date taxday;
@DateTimeFormat(iso = ISO.DATE_TIME)
private Date updatedate;
@NotEmpty
private String census;
public String getCosttype() {
return costtype;
}
public void setCosttype(String costtype) {
this.costtype = costtype;