errors.setNestedPath("");
return;
}
String chemin = null;
Document cv = folder.getPi().getCv();
if (!cv.getName().equals("")) {
errors.setNestedPath("folder.pi.cv");
errors.rejectValue("data", "data.invalid",
"Vous avez d�ja envoy� un cv: supprimez le avant!");
errors.setNestedPath("");
return;
}
String id = Generator.getRandomId();
chemin = request.getSession().getServletContext().getRealPath(
"/")
+ "uploads/CV/" + id + "_" + nomDocument;
enregistrer(fichier, chemin);
cv.setName(id + "_" + nomDocument);
} else if (todelete != null) {
System.out.println("DELETING RESUME");
Document cv = folder.getPi().getCv();
File f = new File(request.getSession().getServletContext()
.getRealPath("/")
+ "uploads/CV/" + cv.getName());
f.delete();
cv.setName("");
}
} else if (page == 3) {
if (request.getParameter("add") != null) {
errors.setNestedPath("folder.currentPromoDetail");