struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aladar The Dinosaur" <ala...@telocity.com>
Subject Re: Dyna Form bean properties
Date Tue, 27 Aug 2002 02:29:07 GMT
GREAT!!. I got it and it works. Thank you.

Scott

----- Original Message -----
From: "Craig R. McClanahan" <craigmcc@apache.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Monday, August 26, 2002 8:41 PM
Subject: Re: Dyna Form bean properties


>
>
> On Mon, 26 Aug 2002, Aladar The Dinosaur wrote:
>
> > Date: Mon, 26 Aug 2002 20:18:34 -0500
> > From: Aladar The Dinosaur <aladar@telocity.com>
> > Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> > To: struts-user@jakarta.apache.org
> > Subject: Dyna Form bean properties
> >
> > Hello,
> >
> > I'm looking to populate the dyna-form properties back to the form in the
> > event of a validation failure. It appears that I'll have to use
<bean:write
> > name='key' property='attr' /> tag in the JSP page to assign the values
back
> > into the form fields, but I can't figure out what the name of the bean
name
> > should be. Or, is there another way to do this? If I use plain
actionForm
> > this isn't a problem, since I know the name of the bean. However, this
> > doesn't seem to work with dynaValidatorForm.
> >
>
> DynaActionForm is no different from ActionForm in this respect -- the
> property values should already be there for proper redisplay.  To prove
> it, deploy the standard struts-example app and try to log in with invalid
> values (i.e. other than "user" and "pass").  You'll see the form
> redisplayed, along with the error messages, with the username
> pre-initialized to what you entered (passwords are deliberately not
> redisplayed to avoid security risks of someone seeing what you typed when
> viewing the page source).
>
> One thing to watch out for -- if you are using request-scope form beans,
> and you're doing a redirect (instead of a forward), that will not work --
> a redirect causes a second request to occur, so the request scope
> attributes are lost.
>
> > Can someone help?
> >
> > Thank you,
> > Scott
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message