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

Igor Drobiazko commented on TAP5-1373:
--------------------------------------

I guess I was not clear enough. I'm talking about aborting the event in the 
generated method. As of now the code in the page above is equivalent to:

public class Foo {

   private String bar;

   void onActivate() {
       bar = "baz";
   }

   void onActivate(String bar) {
       this. bar = bar;
   }
} 

This way both methods are called. The method with a string argument should 
abort the event by returning true. So the generated bytecode should be 
equilvalent to:

public class Foo {

   private String bar;

   void onActivate() {
       bar = "baz";
   }

   boolean onActivate(String bar) {
       this. bar = bar;

     return true;
   }
} 

> @PageActivationContext should case the activate event to be aborted
> -------------------------------------------------------------------
>
>                 Key: TAP5-1373
>                 URL: https://issues.apache.org/jira/browse/TAP5-1373
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.2.4
>            Reporter: Igor Drobiazko
>            Assignee: Igor Drobiazko
>
> Currently it is not possible to have both: a field annotated with 
> @PageActivationContext and a no-args onActivate() method. The generated 
> method doesn't abort the event, so that the no-args activation method is 
> called afterwards. This behaviour overrides the activation context retrieved 
> from the URL.
> public class Foo {
>    @PageActivationContext
>    private String bar; 
>    void onActivate() {
>        bar = "baz";
>    } 
> }
> The generated method should store a "true" result in order to abort the event.

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

Reply via email to