[
https://issues.apache.org/jira/browse/TAPESTRY-2598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623185#action_12623185
]
Filip S. Adamsen commented on TAPESTRY-2598:
--------------------------------------------
What happens is that you're asking Tapestry to redirect to your page. When that
happens, it's activated and again told to redirect to your page. An infinite
loop at this point is expected.
That's why you have to return null. Perhaps this should be added to the docs?
> Infinite loop when returning current page instance from onActivate using
> "this"
> -------------------------------------------------------------------------------
>
> Key: TAPESTRY-2598
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2598
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.14
> Reporter: Vjeran Marcinko
>
> This kind of activate handler goes into infinite loop:
> Object onActivate() {
> System.out.println("This is looping infinitely ...");
> return this;
> }
> Returning "null" instead of "this" works OK. It's stated in docs that "null"
> should be used when wanting to direct to current page, but nevertheless,
> "this" shouldn't trigger infinite loop.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]