You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ol...@airfrance.fr on 2002/07/19 14:37:03 UTC

Réf. : Bean context and validate() in ActionForm

I just thought that it is impossible to get the bean back, since it is a
new request that is sent to the server, and my DataBean has vanished.
So, is this situation not a problem ? I must redo everything I did
concerning this bean : create it, populate it and put it in the request.
Is this limitation not a strong incentive to use client-side checking ?
Thx !

Olivier





Olivier Schmeltzer
19/07/2002 14:22

Pour : struts-user@jakarta.apache.org
cc :

Objet :     Bean context and validate() in ActionForm

Hi !

Here is the problem I try to deal with. Suppose a JSP page is shown on
somebody's navigator ; this JSP is a form, whose action is a Struts action,
and which needs a bean DataBean to be shown properly. Suppose now that the
basic validation fails (i.e. the validate() method of the ActionForm
returns a non-empty ActionErrors object). The Struts framework shows the
page mentioned in the input parameter, in general the same page that
yielded the validation error, so that the user can correct the mistyped
fields.
Now, the problem is I don't have my DataBean to show the page correctly.
Do you think that the design should provide a way to keep all these request
beans that were available before the validation failed ? Or do you think
that it is up to the validate method to handle these beans to put them back
in the request ? But then, one must be aware of all the needed beans, and I
would assume that different people have developed the JSP file and the
ActionForm code.
I would personnaly think that the by-default behaviour should be to put
back all these beans inside the next request that asks for corrective
action on the fields ; it should not be taken care of by the code inside
the validate() method, but, presumably inside the processValidate() method
of the ActionServlet class.
Thank you for your advice on this matter.

Olivier







----------------

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et secrets. Ce message est adresse a l'individu ou l'entite dont les coordonnees figurent ci-dessus. Si vous n'etes pas le bon destinataire, nous vous demandons de ne pas lire, copier, utiliser ou divulguer cette communication. Nous vous prions de notifier cette erreur a l'expediteur et d'effacer immediatement cette communication de votre systeme.

The information contained in this message is privileged, confidential, and protected from disclosure. This message is intended for the individual or entity adressed herein. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others ;also please notify the sender by replying to this message, and then delete it from your system.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>