struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Boudrant <b...@yahoo.fr>
Subject Re: struts-config.xml question
Date Tue, 01 Oct 2002 16:55:12 GMT
Hi,

'name' is the name of the form used by the action, this name must exist in form-beans declaration.

'attribute' is the key where the form instance will be stored in your session/request scope
for
the action. by default attribute == name, but if you want, by setting 'attribute', you can
change
this key.

@see the struts-config DTD, there is a lot of comment foreach element/attribute.

-emmanuel

 --- Kevin HaleBoyes <kzboyes@yahoo.com> a écrit : > I'm looking at the struts-example
and its
struts-config.xml file.
> 
> In the <action> section for editRegistration, 'attribute' is set
> to 'registrationForm'.  As I understand it (from the DTD), attribute
> is the name of the scoped (session or request) attribute that is used
> to access the ActionForm bean.
> 
> Now in the <action> section for saveRegistration 'name' is set
> to 'registrationForm'.  'name' is the name of the form bean that is
> associated with this mapping.
> 
> What is the difference between 'attribute' and 'name'?
> It seems that they are the same thing.  Is this true?
> 
> Looking at the source for the edit and save registration actions,
> they both call mapping.getAttribute() to get the name of the
> ActionForm bean.  Why does that work for the saveRegistration
> action when it doesn't even have an 'attribute' defined for its
> <action>?
> 
> Why doesn't saveRegistration use 'attribute' instead of 'name'?
> 
> Thanks,
> Kevin.
> 
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
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