@Namespace("/foo")
@ActionName("bar")

should work for most cases where the class is not reused. Adding an optional namespace attribute to the ActionName or handling slashes in the ActionName value will help in those more reusable cases. Something like:

@ActionName("/foo/bar")
or
@ActionName(namespace="/foo", value="bar")

I prefer the first example, because of the reduced typing. I was also thinking of allowing the Namespace to be applied to the package as well, allowing for the entire package to be changed.

-bp

Ian Roughley wrote:
Thanks Ted. The assumption is still that the action names are in the same package, so I added a new feature request for an annotation that combines the action and namespace. I find this particularly useful when a single action class can be used from several workflows, yet the URL (action/namespace) needs to remain consistent for the current workflow. I think it also matches the view tags better (url,form) as they always provide an action name and namespace attribute.

/Ian

Ted Husted wrote:
Yes, SmartURLs does provide annotations for responding to multiple Action names.

* http://code.google.com/p/smarturls-s2/wiki/CustomizationViaAnnotations

On 9/10/07, Ian Roughley <[EMAIL PROTECTED]> wrote:
The one issue that I haven't found a good solution for (and my apologies
if it exists in the smartURLs package - it's on my list of things to
look at) is when an action class needs to be mapped to multiple URL
actions potentially different packages.  This is one time that I find
myself falling back to XML configuration, when I would prefer to use
annotations.  Is anyone working on anything like this?

/Ian

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



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to