struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <hus...@apache.org>
Subject Re: [s2] Validation
Date Thu, 24 Aug 2006 18:05:59 GMT
On 8/2/06, Patrick Lightbody <forum-struts-dev@opensymphony.com> 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message