You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2008/07/05 00:35:20 UTC

@PageActivationContext vs. ComponentMethodAdvice

Igor,

Earlier I had stated that you should have found a way to use
ComponentMethodAdvice, advising the dispatchComponentEvent() method,
to implement support for the @PageActivationContext annotation.

I now think I was in error; the ComponentMethodAdvice approach only
works if the advice can be implemented in terms of the public API of
the component, or the method parameters.  @PageActivationContext
requires access to the fields of the component.  Short of changing
ComponentMethodAdvice to allow access to private fields of the advised
component, it simply is not a good fit.



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: @PageActivationContext vs. ComponentMethodAdvice

Posted by Igor Drobiazko <ig...@gmail.com>.
I also realized that the advice approach requires a change of
ComponentMethodAdvice. That's why I felt comfortable about using the
PageActivationContextWorker.

On Sat, Jul 5, 2008 at 12:35 AM, Howard Lewis Ship <hl...@gmail.com> wrote:

> Igor,
>
> Earlier I had stated that you should have found a way to use
> ComponentMethodAdvice, advising the dispatchComponentEvent() method,
> to implement support for the @PageActivationContext annotation.
>
> I now think I was in error; the ComponentMethodAdvice approach only
> works if the advice can be implemented in terms of the public API of
> the component, or the method parameters.  @PageActivationContext
> requires access to the fields of the component.  Short of changing
> ComponentMethodAdvice to allow access to private fields of the advised
> component, it simply is not a good fit.
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>



-- 
Best regards,

Igor Drobiazko