tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Gavrilov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TAP5-1011) When using @PageActivationContext and providing a no-args activate event handler, the handler may be called too soon
Date Mon, 27 Sep 2010 17:29:36 GMT

    [ https://issues.apache.org/jira/browse/TAP5-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915378#action_12915378
] 

Alexander Gavrilov commented on TAP5-1011:
------------------------------------------

It's seems like tapestry skips OnEvent advice for ConcreteClass method and create one for
method in BasePage. For PageActivationContext correct work advices must be invoked in the
sequence "OnEvent advice" -> "PageActivationContext  advice", but in this case the sequence
is different.  
   

> When using @PageActivationContext and providing a no-args activate event handler, the
handler may be called too soon
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1011
>                 URL: https://issues.apache.org/jira/browse/TAP5-1011
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.1
>
>
> It appears that the onActivate() method is called before the @PageActivationContext logic,
which means the following can fail:
> @PageActivationContext
> private MyEntity entity;
> void onActivate()
> {
>   if (entity == null) throw new RuntimeException("Entity not found.");
> }
> The RuntimeException is thrown even when a valid Entity is in the page activation context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message