struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barett McGavock <bmcgav...@pulvertech.com>
Subject RE: struts repopulate bug?
Date Wed, 05 May 2004 21:08:18 GMT
Dana,

The documentation for the name attribute of the form element says: "If not
specified, the bean associated with the form tag we are nested within is
utilized."

If the name, type and scope matched those defined for the action you
specified, I would expect Struts to have pulled the correct pre-existing
bean. Otherwise, I would expect it to create a new, empty bean as you saw. I
haven't seen the behavior from the first sentence before; I guess I've
gotten in the habit of specifying either action xor name/type.

If the error really bothers you, consider checking out the struts source to
see if this is handled incorrectly!

B

> -----Original Message-----
> From: Dana Hata [mailto:estespark@141.com] 
> Sent: Tuesday, May 04, 2004 7:39 PM
> To: Struts Users Mailing List
> Subject: RE: struts repopulate bug? <solved>
> 
> 
> Problem solved.  Apparently, if you have the name and type 
> attributes defined in the html:form tag, it causes this 
> behavior.  As in:
> 
> <html:form action="MyAction" name="myForm" 
> type="com.blah.blah.MyForm">
> 
> I simply changed that to:
> 
> <html:form action="MyAction">
> 
> And now the form gets repopulated.  Is this obvious to 
> everyone else, or does anyone else think struts should be 
> more resilient?  Also, can someone explain what actually 
> happened in the first one?

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


Mime
View raw message