On 3/2/06, Chris Cheshire <[EMAIL PROTECTED]> wrote: > I want to set up a form that is entered over 3 successive pages. > > I have a single form bean for all of them that includes all of the > fields, and the validate method only validates the fields that were > implemented on each particular step. > > Step 2 will present 1 of 2 sub-forms, depending on an option selected > on the bottom of form 1 (ie, either enter credit card info, or bank > account info). > > I was thinking of using a DispatchAction to process each step and move > to the next part of the form sequence, but my problem is with > automatic validation and the struts-config declarations. I can only > declare one input per action, so if validation fails on any step the > controller would always redirect back to that specified input page - > which might not be the one the user was on. > > Do I actually need to set up multiple actions each with their own > input and process the steps through there or is there a way I can do > this with a single DispatchAction? > > Or better yet, can I set validation to false in struts-config and then > call the validation routine myself inside the action and then forward > back to the correct input page if it fails?
Do not use automatic validation, it prevents your action class from being called if validation fails. See these pages for a start: http://wiki.apache.org/struts/ActionDispatcher http://wiki.apache.org/struts/DataEntryForm Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]