public String save() throws Exception { // System.out.println("********************** carid = " + carid); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date d = new Date(); String day = sdf.format(d); entity.setCheckdate(day); entity.setChecker(userSessionService.getCurrentSysUser()); entity.setStatus(true); service.save(entity); return RELOAD; }
protected void prepareModel() throws Exception { if (entity == null) { if (id != null) { entity = service.get(id); } else { entity = new CarUse(); entity.setStatus(false); } } cars = carDao.findAll(); System.out.println("cars.size() = " + cars.size()); }
public String delete() throws Exception { service.delete(id); return RELOAD; }