What about to create a collection of errors with the page references and
display a unique error page with the list of the errors and the page where
they occurred?
Just an idea.
Marco
-Original Message-
From: Larry Zappeterrini [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 7:39 PM
To: Struts Users Mailing List
Subject: Form validation across multiple pages
This question may be more appropriate for the developer's mailing list, but
I
thought that I would post it here to see what kind of sentiment there is in
Struts' user land. I have been attempting to implement a form that spans
multiple pages that utilizes Struts' validator plug-in. I create an action
in
the configuration file and associate a subclass of DispatchAction with the
intention of mapping each step in the form to a method in the object. Next,
I
create forward elements within the action to correspond to a page in the
form.
This works fine for stepping through the form without errors from start to
finish. The problem arises when an error is caught by the validator. The way
that validator errors are handled in the RequestProcessor(s) included with
Struts is to forward control to whatever resource is specified in the
action's
input attribute. This may not necessarily be the page on which the error
occurred, so the flow of the application is disrupted. The only way around
this is to make each step of the process into its own action so that each
step
has its own input. This is sub optimal in my opinion.
I am curious to know if there has been any discussion about addressing this
situation. A cursory search of the mail archives for the user and developer
lists has turned up nothing. To implement mutliple page form validation in
the
way that I am envisioning would probably require changes in some core parts
of Struts, so I wonder if anyone else would find this desirable. Or maybe I
am
missing some part of the bigger picture that precludes my suggestion. Any
thoughts?
Thanks,
Larry
***
This electronic mail transmission contains confidential and/or privileged
information intended only for the person(s) named. Any use, distribution,
copying or disclosure by another person is strictly prohibited.
***
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]