Thread: [Webwork-devel] DefaultActionFactory change
Brought to you by:
baldree,
rickardoberg
|
From: Matt B. <ma...@sm...> - 2002-01-02 23:43:49
|
I modified DefaultActionFactory to solve the following problem. 1. <A href="formtest!default.action">Form test</A> For this action, the command needs to be stripped and then the alias looked up. 2. <A href="testfoo.action">Misc. tests</A> - this alias maps to Test!foo For this action, the alias needs to looked up and then the command stripped. The simplest solution since aliases are cached was to surround command proxy with alias proxy. This seems to solve the problem and the other tests work. -Matt |
|
From: Matt B. <ma...@sm...> - 2002-01-03 03:25:38
|
Well, I don't think this is a good idea. The problem is several. 1. Multiple Alias proxies. This could be a problem with two caches. 2. Major problem is a possible circular relationship of having an alias with a command and an Action with a command. So, I guess the bottom line is view aliases should just point to JSP or Actions without commands. ----- Original Message ----- From: "Matt Baldree" <ma...@sm...> To: "Webwork-Developer" <web...@li...> Sent: Wednesday, January 02, 2002 5:43 PM Subject: [Webwork-devel] DefaultActionFactory change > I modified DefaultActionFactory to solve the following problem. > > 1. <A href="formtest!default.action">Form test</A> > > For this action, the command needs to be stripped and then the alias looked > up. > > 2. <A href="testfoo.action">Misc. tests</A> - this alias maps to Test!foo > > For this action, the alias needs to looked up and then the command stripped. > > The simplest solution since aliases are cached was to surround command proxy > with alias proxy. This seems to solve the problem and the other tests work. > > -Matt > > > > _______________________________________________ > Webwork-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webwork-devel > > |
|
From: Rickard <ri...@mi...> - 2002-01-03 08:12:20
|
Matt Baldree wrote: > Well, I don't think this is a good idea. The problem is several. > > 1. Multiple Alias proxies. This could be a problem with two caches. Why? Example? > 2. Major problem is a possible circular relationship of having an alias with > a command and an Action with a command. Example? /Rickard -- Rickard Öberg |
|
From: Matt B. <ma...@sm...> - 2002-01-03 12:46:28
|
----- Original Message ----- From: "Rickard" <ri...@mi...> To: "Matt Baldree" <ma...@sm...> Cc: "Webwork-Developer" <web...@li...> Sent: Thursday, January 03, 2002 2:12 AM Subject: Re: [Webwork-devel] DefaultActionFactory change > Matt Baldree wrote: > > > Well, I don't think this is a good idea. The problem is several. > > > > 1. Multiple Alias proxies. This could be a problem with two caches. > > > Why? Example? > Can't think of a good example. > > > 2. Major problem is a possible circular relationship of having an alias with > > a command and an Action with a command. > > > Example? > A) If you surround CommandFactory with AliasFactory Example: <A href="testfoo!foo.action">Misc. tests</A> views.properties with alias testfoo.action=Test!foo 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. 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. > /Rickard > > -- > Rickard Öberg > > > |
|
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 |