--- Jeromy Evans <[EMAIL PROTECTED]> wrote:
> I've been toying with the idea of creating a custom interceptor to do 
> this.  It would be effectively the same as you describe, except that it 
> would inspect the action for the presence of some interface, annotation, 
> or method, and examine the request for some characteristic (eg. get 
> method) and if matched it creates/looks up the model and injects it into 
> an appropriate scope (eg. into the action, into the action context, 
> request scope, or onto the valuestack). 
> 
> That way you could remove all the boilerplate from your actions.
> 
> eg, If it placed the model into the actioncontext you could potentially use
> <s:select name="state" list="#states"/>
> without your action providing the list or getter at all (except 
> something must instruct the interceptor to load it). 

Annotated, parameterized with an injectable load implementation?

The load impl takes a context, from which it could use whatever information
needed to create/load the object, or be stubbed during development and
testing.

Dave


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

Reply via email to