struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Kyser <ktra...@comcast.net>
Subject How to specify input to validating multi-page wizard?
Date Wed, 05 Mar 2003 17:22:21 GMT
Hello,

I have an Action for a multi-page wizard. I'm using DynaValidatorForm.

What I'm having trouble with is this: if I submit a page and it fails
due to validation rules, how can I direct it back to the "current" page?

As you can see below, I've supplied input="sandbox.wizard.page1"
to give it the first page to fall back to, but that's no good if the 
user
makes it past the first page and fails on the second. ('d want to
display the second page there and let them try again)

If I omit the input parameter, I get (as expected):

	No input attribute for mapping path /wizard

Any ideas?

TIA,

-jeff

my struts-config.xml snippet below:

         <action path="/wizard"
                 type="torch.webapp.sandbox.action.WizardAction"
                 name="wizardForm"
                 scope="request"
                 validate="true">
             <forward name="failure"
                      path="/do/go2wizard">
             </forward>
             <forward name="page1"
                      path="sandbox.wizard.page1">
             </forward>
             <forward name="page2"
                      path="sandbox.wizard.page2">
             </forward>
             <forward name="done"
                      path="/do/wizard/success">
             </forward>
         </action>

         <action path="/go2wizard"
                 parameter="sandbox.wizard.page1"
                 validate="false"
                 name="wizardForm"
                 type="org.apache.struts.actions.ForwardAction">
         </action>

         <action path="/wizard/success"
                 parameter="sandbox.wizard.success"
                 validate="false"
                 name="wizardSuccessForm"
                 type="org.apache.struts.actions.ForwardAction">
         </action>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message