throws Exception {
if (log.isDebugEnabled()) {
log.debug("entering 'onSubmit' method...");
}
AuthentificationElement authentificationElement = (AuthentificationElement) command;
boolean isNew = (authentificationElement.getAuthentificationId() == null);
Locale locale = request.getLocale();
if (request.getParameter("delete") != null) {
authentificationElementManager.removeAuthentificationElement(authentificationElement.getAuthentificationId().toString());
saveMessage(request, getText("authentificationElement.deleted", locale));
} else {
authentificationElementManager.saveAuthentificationElement(authentificationElement);
String key = (isNew) ? "authentificationElement.added" : "authentificationElement.updated";
saveMessage(request, getText(key, locale));
if (authentificationElement.isEdited()) {
return new ModelAndView("redirect:updating.html?id=" + authentificationElement.getAuthentificationId() + "&fieldId=" + request.getParameter("fieldId"));
}
}
return new ModelAndView(getSuccessView());
}