I know this has been discussed before, but I was in a
group and we were discussing if there was any way to
completely separate the view from the controller for
multi-page forms. I've did a multi page example where
you specified what page you were on in a hidden field
and also associated a field with a page so the
validation would know what to validate.
The best idea that came out of the group was to define
a separate action in the struts-config.xml that would
share the same Action and ActionForm class and have a
previous and next forward defined to navigate through
the multiple pages. Validation would be performed by
checking the request object and using reflection to
only check the fields that were submitted. This way
the page designer could just layout the pages and
define the actions and it keeps the view separate from
the controller. As far as knowing when you were at
the end to run all validations again, I thought that
if there was no 'next' forward defined the controller
could look for a 'success' forward.
The only other issue left which is a pain is how to
deal with resetting default checkbox values (possibly
pass in the defaults along with the action so it isn't
hard coded?).
Any thoughts, comments, or different ways of handling
this would be appreciated.
David
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text