Shirish,
The solution you suggest me is quite good for me and is
near to my approach. In my ActionForm, I have a restoreDatas
method which is called to repopulate datas in case of validation errors.
This is a little bit cumbersome. Because I have to go back to the database
from the ActionForm.

Can you tell me in your case, how you are doing to forward to another
action when a validation fails(from ActionForm). The only way I know to
detect validation
failure is to call ActionErrors.isEmpty()  method. And as I know, It' the
input
of the action that called back .

regards,
Meissa



|---------+------------------------------>
|         |           shirishchandra.sakh|
|         |           [EMAIL PROTECTED]        |
|         |                              |
|         |           05/12/2002 17:15   |
|         |           Veuillez répondre à|
|         |           "Struts Users      |
|         |           Mailing List"      |
|         |                              |
|---------+------------------------------>
  
>-----------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                   |
  |       Pour :    [EMAIL PROTECTED]                                     
                                   |
  |       cc :                                                                         
                                   |
  |       Objet :   RE: setting form attributes within jsp                             
                                   |
  
>-----------------------------------------------------------------------------------------------------------------------|




Ok.I got your problem.
But as U dont want to put the collection in session , the only way out is
to
get it back from model and populate it in the form before sending it to
jsp.
I think in such case if u dont want to keep the list in session but
repopulate
it on validation error(Like a country list on a user input form..)you can
forward to another action in case of error which will repopulate the form
with
the collection.and then forward it back to the same jsp.

We have pretty much similar functionality.And u can even have a generic
action
class which will just populate the forms in case of errors and send them
back
to jsps.

regards,
Shirish

-----Original Message-----
From: meissa.Sakho [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 4:56 PM
To: struts-user; meissa.Sakho
Subject: setting form attributes within jsp


Hi all,

I would like to set some of my form attributes within the jsp so that
to be able to get it back when the form validation fails.
the conserned attribute is a collection and I don't want to put in in the
session.

I've tried the jsp setProperty tag in vain.

the attributes have getters and setters method in the ActionForm bean.

can someone help me about that

Thanks

meissa



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



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







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

Reply via email to