You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Nick Westgate (JIRA)" <de...@tapestry.apache.org> on 2008/01/03 02:21:33 UTC

[jira] Reopened: (TAPESTRY-1662) Render phase short-circuiting is not implemented for methods of the same phase.

     [ https://issues.apache.org/jira/browse/TAPESTRY-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Westgate reopened TAPESTRY-1662:
-------------------------------------


This issue is not a duplicate of TAPESTRY-1805.

In a nutshell, it's the answer to the following question:

My component returns true for beforeRenderBody().
Should this prevent all other beforeRenderBody events from executing?

If so, it doesn't, and is a bug. If not, the docs need to restate the short-circuiting functionality.
Seems it's a bug is because of the comment next to the exception raised:
        // Given that this method is *only* invoked from code
        // that is generated at runtime and proven to be correct,
        // this should never, ever happen. But what the hell,
        // let's check anyway. 

Cheers,
Nick.

> Render phase short-circuiting is not implemented for methods of the same phase.
> -------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1662
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1662
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.5
>            Reporter: Nick Westgate
>            Assignee: Howard M. Lewis Ship
>            Priority: Critical
>
> According to the docs on render phase short-circuiting for methods of the same phase:
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
> "If a method returns a true or false value, this will short circuit processing.
> Other methods within the phase that would ordinarily be invoked will not be invoked."
> This is currently unimplemented. (Only other "inner" phases are short-circuited & not invoked.)
> Changes would primarily affect:
> org.apache.tapestry.internal.structure.ComponentCallback
> org.apache.tapestry.internal.structure.ComponentPageElementImpl
> In ComponentPageElementImpl.invoke(...), the loop:
>             while (i.hasNext())
>                 callback.run(i.next());
> needs to implement the short circuiting, for example:
>             while (i.hasNext())
>                 if (callback.run(i.next()))
>                     break;
> This change would cascade up to ComponentCallback and all its usage in ComponentPageElementImpl.
> Cheers,
> Nick.

-- 
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org