Activation event handler regression after upgrading from 5.4-beta-22 to 5.4-beta-31

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Activation event handler regression after upgrading from 5.4-beta-22 to 5.4-beta-31

Chris Poulsen
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
Reply | Threaded
Open this post in threaded view
|

Re: Activation event handler regression after upgrading from 5.4-beta-22 to 5.4-beta-31

Lance Java
Possibly a sign you should be using composition instead of inheritance ;)
Reply | Threaded
Open this post in threaded view
|

Re: Activation event handler regression after upgrading from 5.4-beta-22 to 5.4-beta-31

Michael Gentry-2
In reply to this post by Chris Poulsen
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 <[hidden email]>
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
>
Reply | Threaded
Open this post in threaded view
|

Re: Activation event handler regression after upgrading from 5.4-beta-22 to 5.4-beta-31

Chris Poulsen
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 <[hidden email]>
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 <[hidden email]>
> 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
> >
>