You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by James Carman <ja...@carmanconsulting.com> on 2006/06/12 19:30:41 UTC

New EnhancementOperation.interceptMethodImplementation() method...

All,

When writing the Acegi integration, I needed to be able to put some logic
*before* the call to the superclass' implementation of a listener method in
order to verify that the current user has the required roles.  Anyway, to do
that, I had to call addMethod() and not extendMethodImplementation() because
extendMethodImplementation() puts all logic *after* the call to the
superclass' implementation.  The problem with this is that what if I have
another enhancement class that wants to do something similar?  Since the
method has already been added, I'll get an exception.  What I need is a new
method on EnhancementOperation that allows me to inject logic before the
superclass' implementation call.  Thoughts?

James



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


Re: New EnhancementOperation.interceptMethodImplementation() method...

Posted by Howard Lewis Ship <hl...@gmail.com>.
Good idea, like the name as well.

On 6/12/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> All,
>
> When writing the Acegi integration, I needed to be able to put some logic
> *before* the call to the superclass' implementation of a listener method
> in
> order to verify that the current user has the required roles.  Anyway, to
> do
> that, I had to call addMethod() and not extendMethodImplementation()
> because
> extendMethodImplementation() puts all logic *after* the call to the
> superclass' implementation.  The problem with this is that what if I have
> another enhancement class that wants to do something similar?  Since the
> method has already been added, I'll get an exception.  What I need is a
> new
> method on EnhancementOperation that allows me to inject logic before the
> superclass' implementation call.  Thoughts?
>
> James
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com