attribute is an ... attribute (bit confusing) of an ActionMapping. The
getAttribute() method returns the value of the attribute attribute - or
the name attribute if the attribute attribute is null. ActionMapping
actually inherits this from ActonConfig (in o.a.s.config) so the proper
javadoc for it (if it exist) would be found there.
/**
* The request-scope or session-scope attribute name under which our
* form bean is accessed, if it is different from the form bean's
* specified <code>name</code>.
*/
That's the javadoc comment for the attribute attribute - taken from
ActionConfig.java. So the attribute attribute, then, specifies the name
under which we can find the form-bean associated with this action -
whether it is stored in request or session scope is specified by a
different attribute - scope.
Questions on this level can most easily be answered by consulting the
source :-) Go checkout a copy from CVS (if you can) or grab a copy of
the latest source release (beta 2 - some of it has been updated, but for
questions such as this it's still valid I believe). I wish they'd do
nightly source snapshots too ...
Howard Miller wrote:
>Hi,
>
>Confused again....
>
>short question.... what does the method ActionMapping.getAttribute() do?? The
>javadoc for it is a bit terse!
>
>Longer version... I'm working through the struts-example (carefully) this time, and
>it
>keeps turning up - I simply can't see what its for. In particular in
>EditRegistrationAction.java it is used to store the RegistrationForm bean that is
>created. Why is that done? I would have thought that is a bean is stored in the
>request or session scope it would just have a constant value - not this mystery value
>-
>what am I missing?
>
>While on the subject, (and I suspect related) - what does ActionMapping.getScope()
>do? I don't get how an Action can have a scope and/or an Attribute. What's the
>story??
>
>Howard Miller
>
--
Eddie Bush
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>