public ActionForward updateNickname(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) {
PersonBean personBean = getRenderedObject("nickname");
Person person = getLoggedPerson(request);
EmergencyContactBean emergencyContactBean = new EmergencyContactBean(person);
try {
person.setNickname(personBean.getNickname());
} catch (DomainException e) {
addActionMessage(request, e.getKey());
request.setAttribute("personBean", new PersonBean(person));
request.setAttribute("emergencyContactBean", new EmergencyContactBean(person));
} catch (BennuCoreDomainException be) {
addActionMessage(request, be.getLocalizedMessage(), false);
request.setAttribute("personBean", new PersonBean(person));
request.setAttribute("emergencyContactBean", new EmergencyContactBean(person));
}
request.setAttribute("personBean", personBean);
request.setAttribute("emergencyContactBean", emergencyContactBean);