You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Desjardins, Nicolas" <Ni...@microcell.ca> on 2002/09/26 16:41:37 UTC

ActionForm

Hi,

i have a Form (ActionForm) in wich i have a list that is feeded from my
database.  When i validate with the validate method in the ActionForm and an
error is found, i cannot see the form again because it tells me that my bean
(that contain the list) is not found...

I use struts 1.1b2, is the validator a solution for my problem?  Is there
any other way of doing such a thing?

Thanks,

Nicolas



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


RE: ActionForm

Posted by Robert Taylor <rt...@mulework.com>.
I just ran into a similar problem where I have a set up action which
populates the form (in request scope) and forwards to the .jsp page. When
validation failed, I had my input attribute set to the .jsp page and was
getting the behavior your described. I changed the input attribute to be the
action mapping of the set up action and the problem went away.

If you think about it, it makes sense. The set up action stores the
list/options data in the request scope. Once the page is render, then its
gone. If you try to access the page directly without going through the set
up action, then the form never gets populated with the data. By setting the
input attribute to the set up action  action mapping, the data is retrieved
and populated and therefore can be rendered to the screen.

robert

> -----Original Message-----
> From: Desjardins, Nicolas [mailto:Nicolas.Desjardins@microcell.ca]
> Sent: Thursday, September 26, 2002 10:42 AM
> To: 'Struts Users Mailing List'
> Subject: ActionForm
>
>
> Hi,
>
> i have a Form (ActionForm) in wich i have a list that is feeded from my
> database.  When i validate with the validate method in the
> ActionForm and an
> error is found, i cannot see the form again because it tells me
> that my bean
> (that contain the list) is not found...
>
> I use struts 1.1b2, is the validator a solution for my problem?  Is there
> any other way of doing such a thing?
>
> Thanks,
>
> Nicolas
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


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