});
}
public ActionForward onExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
PersonalAnswersForm f = (PersonalAnswersForm) form;
if (CoreUtil.getPageInterceptListenerById(request.getSession(), "changePersonalAnswers") == null) {
if (f.getReferer() == null) {
f.setReferer(CoreUtil.getReferer(request));
}
}
List<PersonalAnswer> personalAnswers = new ArrayList<PersonalAnswer>();
User user = LogonControllerFactory.getInstance().getUser(request);
AttributeDefinition def;
for (int i = 0; i < PersonalQuestionsAuthenticationModule.SECURITY_QUESTIONS.length; i++) {
String id = PersonalQuestionsAuthenticationModule.SECURITY_QUESTIONS[i];
def = (AttributeDefinition)PropertyClassManager.getInstance().getPropertyClass(UserAttributes.NAME).getDefinition(id);
String answer = Property.getProperty(new UserAttributeKey(user, def.getName()));
personalAnswers.add(new PersonalAnswer(id, answer==null ? "" : answer, def.getLabel()));
}
f.initialize(personalAnswers);
if (request.getSession().getAttribute(Constants.REQ_ATTR_PERSONAL_ANSWERS_CHANGE_REASON_MESSAGE) != null) {
ActionMessages messages = new ActionMessages();
messages.add(Globals.MESSAGE_KEY, (ActionMessage) request.getSession().getAttribute(
Constants.REQ_ATTR_PERSONAL_ANSWERS_CHANGE_REASON_MESSAGE));
saveMessages(request, messages);