Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.