return mapping.findForward("editCandidacyInformation");
}
public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
final PersonalInformationBean personalInformationBean = getRenderedObject("personalInformationBean");
if (personalInformationBean.getSchoolLevel() != null
&& personalInformationBean.getSchoolLevel().isHighSchoolOrEquivalent()) {
personalInformationBean.setCountryWhereFinishedHighSchoolLevel(personalInformationBean
.getCountryWhereFinishedPreviousCompleteDegree());
}
final Set<String> messages = personalInformationBean.validateForAcademicService();
if (!messages.isEmpty()) {
for (final String each : messages) {
addActionMessage(request, each);
}
request.setAttribute("personalInformationBean", personalInformationBean);
return mapping.findForward("editCandidacyInformation");
}
try {
personalInformationBean.updatePersonalInformation(false);
} catch (DomainException e) {
addActionMessage(request, e.getKey(), e.getArgs());
request.setAttribute("personalInformationBean", personalInformationBean);
return mapping.findForward("editCandidacyInformation");
}
request.setAttribute("studentID", personalInformationBean.getStudent().getExternalId());
return mapping.findForward("visualizeStudent");
}