I'm hoping that someone can help me. I have been running through the
spring tutorial with hibernate, and all was going well until the
PersonFormController.
The behavior that I'm seeing is that when editing a person, I click on
the save button and get redirected to the persons list. The changes that
have been made are not persisted, and the log doesn't display the
"entering 'onSubmit' method..." log message.
What bothers me is the following line from the logs since my class
doesn't implement that method, I am assuming that one of the parents is
trying to handle the request.
PersonFormController.processFormSubmission(266) | No errors ->
processing submit
I have Googled for hours, and not found anything like this, so I am at
my wits end.
Some relevant code and log snippets follow.
Thanks in advance,
Waldo
=== CODE from personform.jsp ===
...
<form:form commandName="person" method="POST" action="personform.html"
id="personForm">
<form:errors path="*" cssClass="error" element="div"/>
<form:hidden path="id"/>
<ul>
<li>
<appfuse:label styleClass="desc" key="person.firstName"/>
<form:errors path="firstName" cssClass="fieldError"/>
<form:input path="firstName" id="firstName" cssClass="text medium"/>
</li>
<li>
<appfuse:label styleClass="desc" key="person.lastName"/>
<form:errors path="lastName" cssClass="fieldError"/>
<form:input path="lastName" id="lastName" cssClass="text medium"/>
</li>
<li class="buttonBar bottom">
<input type="submit" class="button" name="save"
value="<fmt:message key="button.save"/>"/>
<c:if test="${not empty person.id}">
<input type="submit" class="button" name="delete"
onclick="return confirmDelete('person')"
value="<fmt:message key="button.delete"/>" />
</c:if>
<input type="submit" class="button" name="cancel"
value="<fmt:message key="button.cancel"/>"/>
</li>
</ul>
</form:form>
...
=== CODE from PersonFormController.java ===
public class PersonFormController extends BaseFormController {
...
public ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object
command,
BindException errors)
throws Exception {
log.debug("entering 'onSubmit' method...");
...
}
...
}
=== LOG of transition from: persons list -> person form -> persons list ===
[cbeyond] DEBUG [btpool0-1] PersonFormController.showNewForm(337) |
Displaying new form
[cbeyond] DEBUG [btpool0-2]
PersonFormController.processFormSubmission(266) | No errors ->
processing submit
[cbeyond] DEBUG [btpool0-1] PersonController.handleRequest(31) |
entering 'handleRequest' method...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]