Thanks for the fast reply. I have it working now. Please let me know if I missed anything. Seems too simple so I must have done something wrong
For the record:
Source Code:
Code:
public Event idQuestionsCorrect(RequestContext context) {
AnswerIdQuestionsForm form = (AnswerIdQuestionsForm) context.getFlowScope()
.get("answerIdQuestionsForm");
if(service.areAnswersCorrect(
(String)context.getFlowScope().get("username"),
form.getLastName(),
form.getBirthdate(),
form.getIdNumber())) {
return yes();
}
else {
context.getMessageContext().addMessage(
new MessageBuilder().error()
.code("error.answerIdQuestionsForm.failed")
.build());
return no();
}
}
and my view has the following:
Code:
....
<tr>
<td colspan="3" class="error">
<form:errors />
</td>
</tr>
.....