}
@RequestMapping(value = "doedit", method = RequestMethod.POST)
public String doeditDCTAPById(FormDemandeConsoTempsAccPers formDctap,
BindingResult bindResult, Model model) {
User prof = manager.getUserById(formDctap.getProfId());
if (prof == null)
bindResult.rejectValue("profId", "required",
"Erreur d'identifiant de professeur");
if (bindResult.hasErrors()) {
model.addAttribute("lesProfs", manager.getAllProf());
return "eleve/edit";
} else {
User user = UtilSession.getUserInSession();
DemandeValidationConsoTempsAccPers dctapForUpdate = manager
.getDVCTAPById(Long.valueOf(formDctap.getId()));
if (dctapForUpdate.getEtat() == 0 || dctapForUpdate.getEtat() == 4) {
AccPersonalise acc = new AccPersonalise(null,
formDctap.getAccPersNom(), 1, user.getId());
if (manager.getAPById(formDctap.getAccPersId()) != null) {
acc = manager.getAPById(formDctap.getAccPersId());
dctapForUpdate
.setAccPers(manager.getAPById(formDctap.getAccPersId()));
} else {