You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Poulsen <ma...@nesluop.dk> on 2015/04/22 12:56:27 UTC
Activation event handler regression after upgrading from 5.4-beta-22
to 5.4-beta-31
Hi,
We have an abstract parent class with an activation handler declared like
this:
@OnEvent( EventConstants.ACTIVATE )
void activate( EventContext ec ) (Called)
And an extending class with an activation handler declared like this:
@OnEvent( EventConstants.ACTIVATE )
Object activate( EventContext ec ) (Not called during activation)
After updating to beta-31 the activation handler in the extending class is
not called anymore.
Changing the signature to use the naming convention in the extending class
gets things going again:
Object onActivate( EventContext ec ) (Called after parent activate)
Has anyone else seen this behavior after upgrading from beta-22?
--
Chris
Re: Activation event handler regression after upgrading from
5.4-beta-22 to 5.4-beta-31
Posted by Lance Java <la...@googlemail.com>.
Possibly a sign you should be using composition instead of inheritance ;)
Re: Activation event handler regression after upgrading from
5.4-beta-22 to 5.4-beta-31
Posted by Chris Poulsen <ma...@nesluop.dk>.
We're using inheritance to avoid duplication and inheritance is a supported
pattern in tapestry - So I would not expect this to break by updating to
the latest 5.4 beta.
@Michael - I've though about the signatures, but it have been working up
until now. It just seems odd that the "onActivate" naming convention still
works, while the @OnEvent stopped working.
--
Chris
On Wed, Apr 22, 2015 at 2:38 PM, Michael Gentry <mg...@masslight.net>
wrote:
> I wonder if it might have something to do with the superclass signature
> being:
>
> void activate(EventContext)
>
> and the subclass signature being:
>
> Object activate(EventContext)
>
> I know I've used similar patterns in 5.3, but haven't tried in 5.4 yet.
>
> mrg
>
>
> On Wed, Apr 22, 2015 at 6:56 AM, Chris Poulsen <ma...@nesluop.dk>
> wrote:
>
> > Hi,
> >
> > We have an abstract parent class with an activation handler declared like
> > this:
> >
> > @OnEvent( EventConstants.ACTIVATE )
> > void activate( EventContext ec ) (Called)
> >
> > And an extending class with an activation handler declared like this:
> >
> > @OnEvent( EventConstants.ACTIVATE )
> > Object activate( EventContext ec ) (Not called during activation)
> >
> > After updating to beta-31 the activation handler in the extending class
> is
> > not called anymore.
> >
> > Changing the signature to use the naming convention in the extending
> class
> > gets things going again:
> >
> > Object onActivate( EventContext ec ) (Called after parent activate)
> >
> > Has anyone else seen this behavior after upgrading from beta-22?
> >
> > --
> > Chris
> >
>
Re: Activation event handler regression after upgrading from
5.4-beta-22 to 5.4-beta-31
Posted by Michael Gentry <mg...@masslight.net>.
I wonder if it might have something to do with the superclass signature
being:
void activate(EventContext)
and the subclass signature being:
Object activate(EventContext)
I know I've used similar patterns in 5.3, but haven't tried in 5.4 yet.
mrg
On Wed, Apr 22, 2015 at 6:56 AM, Chris Poulsen <ma...@nesluop.dk>
wrote:
> Hi,
>
> We have an abstract parent class with an activation handler declared like
> this:
>
> @OnEvent( EventConstants.ACTIVATE )
> void activate( EventContext ec ) (Called)
>
> And an extending class with an activation handler declared like this:
>
> @OnEvent( EventConstants.ACTIVATE )
> Object activate( EventContext ec ) (Not called during activation)
>
> After updating to beta-31 the activation handler in the extending class is
> not called anymore.
>
> Changing the signature to use the naming convention in the extending class
> gets things going again:
>
> Object onActivate( EventContext ec ) (Called after parent activate)
>
> Has anyone else seen this behavior after upgrading from beta-22?
>
> --
> Chris
>