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 2011/01/04 02:36:26 UTC
@Decorate / @Advise
I'm documenting @Decorate and @Advise for my workshop materials.
I'm a little perplexed by the fact that these include a serviceInterface,
but matching is done on exact equality (not Class.isAssignableFrom()). That
makes these much less useful ... for example, you can't @Advise all your
DAOs by @Advise(serviceInterface=GenericDAO.class) ... you are better off
using the old-style code and @Match("*DAO").
Is this intentional ... and if not, is it something that can be fixed in
5.3?
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
Re: @Decorate / @Advise
Posted by Igor Drobiazko <ig...@gmail.com>.
I don't recall whether it was intentional or not but we can fix it in 5.3.
Maybe we could add a new attribute "exact" to both annotations to allow both
use cases and/or to ensure backward compatibility with 5.2.
On Tue, Jan 4, 2011 at 2:36 AM, Howard Lewis Ship <hl...@gmail.com> wrote:
> I'm documenting @Decorate and @Advise for my workshop materials.
>
> I'm a little perplexed by the fact that these include a serviceInterface,
> but matching is done on exact equality (not Class.isAssignableFrom()). That
> makes these much less useful ... for example, you can't @Advise all your
> DAOs by @Advise(serviceInterface=GenericDAO.class) ... you are better off
> using the old-style code and @Match("*DAO").
>
> Is this intentional ... and if not, is it something that can be fixed in
> 5.3?
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
--
Best regards,
Igor Drobiazko
http://tapestry5.de