Ok - you missed a subtle distiction :-)

It's never going to be different form what is stated in the config file. 
 You could, however, choose to instantiate/populate a form yourself and 
put it under some key that you wanted instead of the key Struts would 
normally expect to find the form under.  The attribute property would 
then specify the name under which you "poked" the form.

MOST of the time, Struts is going to handle your form creation - and the 
population will be handled by Struts on form submits.  Now, for the 
times Struts creates the form, it's going to use the "name" attribute of 
the form-bean -- but if you put a form out there which Struts does not 
create (and has no knowledge of!) you could use the attribute property 
to specify the name it can be looked up by.  The form would have to be a 
descendant of ActionForm in order to get passed to the action, but you 
may have some case in which it were handy to do this.  Maybe ... well, I 
can't dream up a good example.

The point I've been trying to make is that this is something Struts has 
done "above and beyond the call of duty" (IMHO) - and that it's not 
going to get used (as you've observed) by most folks.  That being the 
case - there's really no need to get hung-up over it :-)

I really wish one of the commiters would give a more "fleshy" response. 
 Don't feel other folks' silence is a cue to keep posting the same 
question though - please :-)  Struts is open source, and, while Craig 
does a phenomenal job of answering many questions (both courteously and 
well beyond "fully") - and while other folks, committers and 
non-committers, try to follow in his footsteps, there are times 
questions go unanswered.  It doesn't mean nobody saw the question or 
that they didn't notice nobody answered it - it's entirely possible 
nobody had a good answer and so didn't want to eat up bandwidth speculating.

I'm sorry if I haven't explained this to your satisfaction - I do hope 
someone with a better explaination will step forward - but I really 
don't see why understanding this one property is so important :-) 
 Struts won't use it unless you tell it to - there's no reason to care 
about it's existence that I see ...

Howard Miller wrote:

>Yes sorry, I read it.
>
>I even resorted to downloading/reading the source code.
>
>I'm just curious as to what this property is for? When would "attribute" be different 
>from that specified in the configuration file? I can't see why/how?
>
>HM
>
>On 2 Oct 2002 at 17:17, Eddie Bush wrote:
>
>>Did you miss my previous post regarding this?  I think it finally hit 
>>the list - you should have it.  My mail has been acting odd the last 
>>week or so though, so ...
>>

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to