Ted, My opinion on this is that the ! syntax should be used strictly as a URL pattern and not anywhere else. That means we shouldn't name files like foo!bar-validation.xml, but instead figure out another way to map it to a context.
Currently, you can name those files "foo-bar-validation.xml" where foo is the class and bar is the "context" (ie: the action name). It might be time to instead re-evaluate the context being in the file name and instead allow for validation rules to be bound to the "context" and/or method invocation _inside_ the XML file. Ie: you'd have one foo-validation.xml and then in there you could have validation rules that only map to certain action aliases (contexts) or only when certain methods are being invoked. Make sense? PS: The reason I say the ! syntax should be strictly left to a URL pattern thing is that we should encourage people experimenting with their own ActionMapper any time they choose. They could, for example, change ! to be "/" so that it looks more like a path. We wouldn't want to bleed our the "!" pattern to other parts of the application. > On 8/2/06, Patrick Lightbody > <[EMAIL PROTECTED]> wrote > under [s2] Validation: > > One thing I'd add before Jason chimes in is that > you can tie validation to the action name > >by naming the file > ActionClass-actionName-validation.xml. But you > still also must have > >the action class in the filename as well. > > OK, then to complete the idiom, do we support > > * ActionClass!alias-validation.xml > > to specify context-based validation for the alias > command? > > And, do we support > > <action name="Something!different" > class="somePackage.Something" > method="veryDifferent"> > <result input="veryDifferent.jsp /> > </action> > > <action name="Something" > class="somePackage.Something"> > <result input="Something.jsp /> > </action> > > So that an action element could override the settings > for selected > "!alias" methods (and let the others "fall-thru" to a > base action)? > > Is the "!" idiom promoting a method to a command > (which is to say > "action mapping")? > > If so, then I believe the idiom is not fully > expressed. If the "!" > idiom is creating a "virtual command", then shouldn't > we be able to > declare a "static command" using the same syntax, > and/or tie other > resources (like the validator) to the "virtual > command"? > > Should the "!" mean: if this command doesn't exist, > look for a command > by the name *!, with a method by the name !*, and > then use > "command!method" as the cannonical command name. > > I believe the fundamental question is > > * When we say Something!diffferent, do we mean to > > ** pass "different" as an implicit "method=" > attribute to the > Something command, or > > ** create a new ad-hoc "Something!different" command, > that inherits > settings from a Something command. > > -Ted. > > ------------------------------------------------------ > --------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > My --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=39135&messageID=82511#82511 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]