Re: [Webwork-devel] DefaultActionFactory change
Brought to you by:
baldree,
rickardoberg
|
From: Rickard <ri...@mi...> - 2002-01-03 13:09:45
|
Matt Baldree wrote: > A) If you surround CommandFactory with AliasFactory > > Example: > <A href="testfoo!foo.action">Misc. tests</A> > > views.properties with alias > testfoo.action=Test!foo But calling a command with a command doesn't make any sense. Are there any examples that make sense? AFAICT you will always either use an alias pointing to an action+command, or use URL's with commands pointing to aliases of actions (without commands). Never combined, again, since that doesn't make sense. What would the semantics be? > In this scenario, the first alias would not find testfoo!foo.action, then > the command would be stripped and the second alias would find testfoo > returning Test!foo as an action. This action won't be found. I realize this > is an odd case and we could just say it will not support this scenario. Exactly. > B) If you leave the default factory as it is now, then this example will > fail. > > Example: > <A href="testfoo.action">Misc. tests</A> > > views.properties with alias > testfoo.action=Test!foo > > In this scenario, the command would see "testfoo.action" and would see that > it is not a command then alias would find and return Test!foo as the > action.. This action won't be found. Then the solution is simple: wrap command factory with aliasing. And this is how I initially coded it. Looking at the CVS log I see that Victor Salaman removed it for some reason. Must have thought the duplication was a bug (which it wasn't/isn't). I'll re-add it. /Rickard -- Rickard Öberg |