Re: [Webwork-user] Extending something other than ActionSupport
Brought to you by:
baldree,
rickardoberg
From: Rickard <ri...@jb...> - 2001-01-02 08:18:00
|
Hi! Tim White wrote: > > Note that ActionSupport.getResult() uses getView("result",action). So= , > > if you use getResult through delegation you should first call > > setAction(actionName) on the support class. Or, you can do > > getView("result","myaction") directly. >=20 > Would it be a good idea/helpful to include a static > getResult("myAction") method in ActionSupport and ActionForm support? It would be possible, but I prefer to avoid statics as much as possible (I know there are some already, but I don't really like it). If statics are introduced there should be a really really good reason for it. > That way if all you are using out of there you don't even need your own > ActionSupport object...? Or, is there a way to enhance > ActionFormSupport to look back at the calling object for the ActionName= ? ActionSupport (and thus ActionFormSupport) already get their action names through the "setAction" method. If you don't want to subclass *Support classes you can add "setAction(String)" yourself. The Dispatcher will treat this as a request for the action name to be passed. regards, Rickard --=20 Rickard =D6berg Email: ri...@jb... |