This is the first time I've raised anything on struts-dev, so please let me know if I should turn around and file it into bugzilla for tracking instead.

All comments are based on 1.1 release.

I've been making some pretty careful note of the Struts Example tutorial, and I'm having some issues with the declaration of the /editSubscription and /editRegistration actions. In terms of their logic, my understanding is that:
1) They're called through action chaining by the /saveRegistration and /saveSubscription actions respectively;
2) They create and populate into session scope instances of SubscriptionForm and RegistrationForm accordingly in the code for the action classes;
3) Because there is no "name" attribute specified on the action tag for each, there will be no automatically created
This is my understanding from running the system, as well as walking through the relevant code in the RequestProcessor phases. Please let me know if I'm mistaken.


My concern is in a mismatch with the documentation in the struts-config_1_1.dtd (and with the struts-config_1_2.dtd in current CVS), which states that the "attribute" XML attribute (isn't THAT confusing... :-) is:

"Name of the request-scope or session-scope attribute that
is used to access our ActionForm bean, if it is other than
the bean's specified "name". Optional if "name" is specified,
else not valid."

However, the tutorial isn't doing this: both /editSubscription and /saveRegistration are using the "attribute" XML attribute without using the "name" XML attribute, which seems to be doing "the right thing" w.r.t. the application's semantics, but it doesn't match the documentation. It could also be that the example is using undocumented features of the system, which is nice, but possibly not well suited to a first tutorial of Struts.

It seems from my reading that the correct way that the DTD documentation could be rewritten if in fact the documentation is incorrect is:
"Name of the request-scope or session-scope attribute that is used to access our ActionForm bean, if it is other than the bean's specified "name". If "name" is not specified, then "attribute" will be disregarded by the Request Processor."


This makes it clear that it's legal to specify "attribute", but that Struts will just ignore it. At least that's what I think is going on.

Explainations? Comments? Should I file this in Bugzilla?

Kirk Wylie
M7 Corporation


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



Reply via email to