This is probably a VERY obvious issue but I cannot see what I am doing wrong. It is probably fairly common too, when you don't have everything setup correctly. I there a general place I should look when this happens.
I am trying to get a AbstractWizardFormController implemenatation to work that is explained in a book that I am reading "Expert Spring MVC and Web Flows".
I setup all the controller config stuf in the constructor (I have also tried setting it up in the myapp-servlet.xml file with the same results).
The following is a snippet from my jsp.Code:public CreateAccountWizardController() { logger.info("initialize controller..."); setCommandName("createAccount"); setCommandClass(CreateAccount.class); setValidator(new CreateAccountValidator()); setPages(new String[]{"usernameAndEmail", "billingAddress"}); logger.info("initialize controller done"); }
Also the tag formField is as follows:Code:<spring:nestedPath path="createAccount"> <form action="" method="post"> <div> <input type="hidden" name="_page0" value="true" /> <input type="hidden" name="_target1" value="true" /> </div> <table> <spring:nestedPath path="account"> <tag:formField name="Username" path="username" /> <tag:formField name="Password" path="password" type="password" /> </spring:nestedPath> <tag:formField name="Confirm Password" path="confirmPassword" type="password" /> <spring:nestedPath path="account"> <tag:formField name="Email" path="email" /> </spring:nestedPath> <tr> <td /> <td><input type="submit" value="Go to Step 2" /></td> </tr> </table> </form> </spring:nestedPath>
Code:<%@ tag body-content="scriptless" %> <%@ attribute name="name" required="true" %> <%@ attribute name="path" required="true" %> <%@ attribute name="type" required="false" %> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:if test="${empty type}"> <c:set var="type" value="text" scope="page" /> </c:if> <spring:bind path="${path}"> <tr> <td><label for="${status.expression}" <c:if test="${status.error}">class="error"</c:if>>${name}:</label></td> <td> <input type="${type}" id="${status.expression}" name="${status.expression}" value="${status.value}" /> </td> </tr> </spring:bind>
You probably don't need all this information, and will simply say something to the effect of: "oh, you just need to make sure such-in-such is in your such-in-such" By I am new and having trouble figuring this out. ANY help will be greatly appreciatted.
Thanks in advance,
Tad


Reply With Quote