On Mon, 2006-07-24 at 21:45 +0100, Adam Hardy wrote:
> Ted Husted on 24/07/06 15:22, wrote:
> > On 7/23/06, Adam Hardy <[EMAIL PROTECTED]> wrote:
> >> Can anyone involved in struts 2 tell me about potential brick walls that 
> >> this sort of Action base class and its children would be heading into? I 
> >> checked out the dev list for hints and saw oblique references to Chain of
> >> Commands but couldn't guage much from the threads there.
> > 
> > S2 doesn't use Commons Chain internally. S2 relies on the notion of 
> > "interceptors" to do what we did in S1 with the Chain of Commands. 
> > Essentially, interceptors are POJO filters that let us run custom code 
> > before
> >  and after a key event, like invoking an Action class.
> > 
> > The package that delivers the interceptor mechanism is XWork. XWork also 
> > handles matcing things like URIs to action mappings and it provides the 
> > base 
> > validation framework. Surprisingly little is actually in Struts 2 itself. 
> > Most of the functionality derives from XWork, which is web-neutral. XWork 
> > is 
> > already being used to power other frameworks.
> 
> I've divided up my response as you may have noticed from the list of emails 
> from 
> my email address.
> 
> It all looks very interesting. I just read some stuff on the xworks 
> opensymphony 
> site and it looks pretty sound [1] and [2]. You guys must be working like 
> dogs, 
> there seems to be so much there to integrate. Kudos and respect to you all, 
> this 
> seems to be more and more important the more I find out.
> 
> I am pondering on the command/dispatch style action mechanism like 
> DispatchAction where the dispatch switch is based on an HTTP parameter 
> identified by its prefix.
> 
> Would that mechanism be implemented by a pre-action listener? I'm trying to 
> pick 
> up the lingo on the hoof here [2].

This page will help:
http://opensymphony.com/webwork/wikidocs/ActionMapper.html

If a parameter is sent which has the string "method:" as its beginning,
the DefaultActionMapper uses the rest of the string as the name of the
method to execute for that request.

There is another idiom that is used for method selection which is
fooAction!barMethod.action. In this case the mapper will run the
barMethod of the fooAction. This seems to be going away, as it can be
duplicated by the use of wildcards, as described in this thread:
http://www.mail-archive.com/dev@struts.apache.org/msg22761.html

dave

> On a semantic note, are you really going to have <interceptor-ref> tags in 
> struts-config? Or are you changing the name to something more, ahem, 
> user-friendly?
> 
> 
> Regards
> Adam
> 
> 
> [1] http://xwork.dev.java.net/servlets/NewsItemView?newsItemID=665
> [2] http://confluence.twdata.org/display/WW/Interceptors
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to