So your onActivate method does not actually return null but redirects to
another page.
That explains why handler is not called.

I am not sure what is preferred method to detect page requests vs. event
requests in onActivate methods,
but I can imagine that it could be done by
decorating ComponentRequestHandler
and adding a request attribute with information of kind of request.

However it seems to be quite risky to disable security checks for component
requests.
Are you going to add a security check to every component request handler?


Best regards,
Cezary


On Thu, Dec 20, 2012 at 6:41 PM, lebenski <ben.titma...@hotmail.co.uk>wrote:

> I actually got the problem wrong, it's not the fact that the null return
> prevented the handler from firing, but rather my condition to determine if
> it was a page request rather than a component request was insufficient:
>
>         protected boolean isPageRequest() {
>                 return !request.isXHR() && request.getMethod()=="GET";
>         }
>
> And it was ending up redirecting.
>
> What is the preferred way to check in an onActivate method whether the
> originating request is a page request or simply a component like an
> actionLink making a request?
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Redirect-onActivate-how-to-handle-ActionLink-requests-tp5718883p5718894.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to