struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: [s1] ActionContext in execute()?
Date Mon, 19 Mar 2007 00:28:36 GMT
I tried this out tonight, and I thought it was very beneficial to 
cleaning up my code. In particular, not having to declare parameters 
that I do not need to use.

public void execute(ActionContext context) throws Exception {
}

Steps for development:
1) Add this method signature to Action
2) Would then dispatch to a like signature but of ServletActionContext
3) #2 method would, by default, dispatch to the typical parameter version.

This also allows some interesting dispatching. I can also write a 
dispatcher that dispatches according to this method signature. I really 
like it the idea.

+1. Anyone against it?

Paul

Ted Husted wrote:
> Yes, doing this was on the old 1.4 roadmap.
> 
> On 3/7/07, Joe Germuska <joe@germuska.com> wrote:
>> We talked about this at some length when the ActionContext was first
>> introduced.  We also talked about having the base action implement
>> ActionCommand and/or some other options.
>>
>> I think the only reason we didn't do it then was because it was still 
>> new,
>> and we thought we'd let it settle in for a while.  In fact, the idea you
>> suggest may at one point have been on the roadmap for 1.4.
>>
>> Joe
>>
>> On 3/7/07, Paul Benedict <pbenedict@apache.org> wrote:
>> >
>> > Just gathering some opinions here...
>> >
>> > Would it be preferable to accept an ActionContext in execute() rather
>> > than the 4 parameters?
>> >
>> > public ActionForward execute(ActionContext context) throws Exception;
>> >
>> > Thanks,
>> > Paul
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message