struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raible, Matt" <Matt_Rai...@cable.comcast.com>
Subject RE: form scope question
Date Wed, 26 Mar 2003 23:17:34 GMT
I've seen this a lot with Struts - it seems you can't have forms with the
same name in any two scopes.  To work around this issue, I name my forms
differently.  For instance, I store the logged-in user's form in the session
as "currentUserForm" and when I edit a user, I call it "userForm."

HTH,

Matt

> -----Original Message-----
> From: Kevin Williams [mailto:kewilliams@dreamhousefund.com]
> Sent: Wednesday, March 26, 2003 4:12 PM
> To: struts-user@jakarta.apache.org
> Subject: form scope question
> 
> 
> Hi,
> 
> I am hoping someone can clarify what is exactly happening in my
> application.  I was trying to retrieve a form object in a custom tag
> through the pageContext.findAttribute method, but with no success.  I
> discovered the reason that I wasn't retrieving the value was because I
> had set the form object at the session level, and for some reason an
> additional form object existed at the request level.  Why is there a
> duplicate form object at the request level (whose values are NOT set)
> when I have never specified request scope on any of my action objects
> that use this form?
> 
> Thanks,
> 
> Kevin Williams
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


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


Mime
View raw message