Adam Hardy wrote:
> Or should I define an ActionMapping with validation set to false to display this 
>form page for the first time, and have the form submit to another ActionMapping with 
>validation set to true?

Yes. This is why there *is* a validation switch. =:o)


> Just wondering if I've missed something important.

If you are forwarding an ActionForm between Actions 

action1 -> action2

it can be helpful to have a switch in your base ActionForm to make it
immutable. This way the controller won't step on any changes you make to
the form, and avoids mucking about with dynamic ActionForwards. See the
http.SuperForm in the contrib/scaffold package for an example.

For multipage forms (wizard workflows), it's often helpful to define a
property on your form to give validate a clue as to what fields it
should be working with. The ValidatorForm handles this rather well. 
There is a page property, and you can assign each field to a page in the
configuration file. The validator then only validates fields with a page
equal to or less then the current page number. If things get moved
around, you can just reflect the changes in the configuration file.
(Then just be careful about what you do in reset.)


-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to