put the actionform scope in session in your <action mapping in
struts-config.xml

-----Original Message-----
From: John De Lello [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 12, 2006 4:44 PM
To: user@struts.apache.org
Subject: Validation and Form Collections


Hello Everyone,

I have a question regarding validation.

I have JSP that uses the Html:Options tag to populate a DDLB. The action
class creates the collection and puts it in the Form. All works fine until
the form validation fails. When I come back from the form validation, I am
getting a "Bean define cannot assign to a null value" error.

I know this is because the action class is never reached if validation
fails, so I'm wondering how I can preserve the collection in the form in
that case. Do I need to re-populate the collection in the validate method if
a failure occurs? I was trying to keep all that logic in the action class
only. I can't put the collection in Session because for other reasons that I
don't control.

Any help or suggestions would be appreciated.
Thank you
John




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

Reply via email to