Back Forum Reply New

basic AbstractWizardFormController question

HTML Code:
Hi all,
I'm a new spring user and I've a basic problem when using AbstractWizardFormController : I cannot move from form0
to form1 using quot;Nextquot; !:confused:
What I'm doing wrong or what I'm not doing ? I'm not quite sure about what I should put in my form action feedback.htm?

1)Bean definition
lt;bean id=quot;myFormControllerquot;  name=quot;/feedback.htmquot;  class=quot;trial.MyFormControllerquot;gt;  lt;property name=quot;pagesquot;gt;
lt;listgt;
lt;valuegt;form0lt;/valuegt;
lt;valuegt;form1lt;/valuegt;
lt;valuegt;form2lt;/valuegt;
lt;/listgt;   lt;/propertygt;
lt;/beangt;

2) Controller class
public class MyFormController extends AbstractWizardFormController{

public MyFormController() {
setCommandClass(trial.MyForm.class);
}

@Override
protected ModelAndView processFinish(fromServletRequest arg0,      fromServletResponse arg1,    Object arg2,    BindException arg3)
throws Exception {
//...

return new ModelAndView(quot;byequot;);
}
}

3) Command definition : empty
public class MyForm implements Serializable {
}

4) My forms
- form0.jsp :

lt;%@ include file=quot;include_jstl.jspquot; %gt;
lt;%@ taglib prefix=quot;formquot; uri=quot;tags/formquot; %gt;

lt;htmlgt;
lt;headgt;
lt;titlegt;FORM 0lt;/titlegt;
lt;/headgt;
lt;bodygt;
lt;h1gt;FORM 0lt;/h1gt;
lt;form action=quot;/feedback.htmquot; method=quotOSTquot; gt;
lt;input type=quot;submitquot; value=quot;Nextquot; name=quot;_target1quot;gt;
lt;/formgt;

lt;/bodygt;
lt;/htmlgt;- form1.jsp :
lt;htmlgt;
lt;headgt;
lt;titlegt;FORM 1lt;/titlegt;
lt;/headgt;
lt;bodygt;
lt;h1gt;FORM 1lt;/h1gt;
lt;form action=quot;/feedback.htmquot; method=quotOSTquot; gt;
lt;input type=quot;submitquot; value=quot;Backquot; name=quot;_target0quot;gt;
lt;input type=quot;submitquot; value=quot;Nextquot; name=quot;_target2quot;gt;
lt;/formgt;
lt;/bodygt;
lt;/htmlgt;

- form2.jsp :
lt;htmlgt;
lt;headgt;
lt;titlegt;FORM 2lt;/titlegt;
lt;/headgt;
lt;bodygt;
lt;h1gt;FORM 2lt;/h1gt;
lt;form action=quot;/feedback.htmquot; method=quotOSTquot;gt;
lt;input type=quot;submitquot; value=quot;Backquot; name=quot;_target1quot;gt;
lt;input type=quot;submitquot; value=quot;Finishquot; name=quot;_finishquot;gt;
lt;/formgt;
lt;/bodygt;
lt;/htmlgt;- bye.jsp :

lt;htmlgt;
lt;headgt;
lt;titlegt;BYElt;/titlegt;
lt;/headgt;
lt;bodygt;
BYE
lt;/bodygt;
lt;/htmlgt;

Thanks in advance

Steve
¥
Back Forum Reply New