Return-Path: Delivered-To: apmail-tapestry-commits-archive@locus.apache.org Received: (qmail 45128 invoked from network); 19 Feb 2007 23:09:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Feb 2007 23:09:12 -0000 Received: (qmail 33664 invoked by uid 500); 19 Feb 2007 23:09:20 -0000 Delivered-To: apmail-tapestry-commits-archive@tapestry.apache.org Received: (qmail 33643 invoked by uid 500); 19 Feb 2007 23:09:19 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 33633 invoked by uid 99); 19 Feb 2007 23:09:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 15:09:19 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Feb 2007 15:09:09 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id CD42A1A981A; Mon, 19 Feb 2007 15:08:48 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r509372 - in /tapestry/tapestry5/tapestry-core/trunk/src: main/java/org/apache/tapestry/annotations/ main/java/org/apache/tapestry/corelib/components/ main/java/org/apache/tapestry/corelib/mixins/ main/java/org/apache/tapestry/internal/stru... Date: Mon, 19 Feb 2007 23:08:48 -0000 To: commits@tapestry.apache.org From: hlship@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070219230848.CD42A1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hlship Date: Mon Feb 19 15:08:46 2007 New Revision: 509372 URL: http://svn.apache.org/viewvc?view=rev&rev=509372 Log: Unify the render phase method return values, so that "true" is always the default, and represents the normal progression. Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRender.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderBody.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderTemplate.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/CleanupRender.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/ActionLink.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/GridRows.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Loop.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/PageLink.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Select.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/parameters.apt tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/rendering.apt tapestry/tapestry5/tapestry-core/trunk/src/site/apt/index.apt tapestry/tapestry5/tapestry-core/trunk/src/site/images/component-render-states.graffle tapestry/tapestry5/tapestry-core/trunk/src/site/resources/images/component-render-states.png tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/corelib/components/LoopTest.java tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Count.java Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRender.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRender.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRender.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRender.java Mon Feb 19 15:08:46 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,8 +24,8 @@ /** * Marker annotation for methods associated with the AfterRender phase. This corresponds closely to * {@link org.apache.tapestry.annotations.BeginRender}, but occurs after the template and body of - * the component have been rendered. Often, this is used to render a close tag. Return void or false - * to advance to the {@link org.apache.tapestry.annotations.CleanupRender} phase. Return true to + * the component have been rendered. Often, this is used to render a close tag. Return void or true (the default) + * to advance to the {@link org.apache.tapestry.annotations.CleanupRender} phase. Return false to * return to the {@link org.apache.tapestry.annotations.BeginRender} phase. */ @Target(ElementType.METHOD) Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderBody.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderBody.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderBody.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderBody.java Mon Feb 19 15:08:46 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,9 +23,9 @@ /** * Corresponds to {@link BeforeRenderBody}, allowing additional markup after rendering the body of - * a component, but before rendering the rest of the component's template. Return false (the + * a component, but before rendering the rest of the component's template. Return true (the * default) to progress to the {@link AfterRenderTemplate} or {@link AfterRender} phase (depending - * on whether the component does or does not have a template). Return true to return to the + * on whether the component does or does not have a template). Return false to return to the * {@link BeforeRenderBody} phase. */ @Target(ElementType.METHOD) Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderTemplate.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderTemplate.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderTemplate.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/AfterRenderTemplate.java Mon Feb 19 15:08:46 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,23 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.apache.tapestry.annotations; - -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -/** - * Corresponds to {@link BeforeRenderTemplate}, allowing additional markup after rendering the - * component's template. Returning false is the default, which progress to the {@link AfterRender} - * phase. Return true to return to the {@link BeforeRenderTemplate} phase. - */ -@Target(ElementType.METHOD) -@Retention(RUNTIME) -@Documented -public @interface AfterRenderTemplate { - -} +package org.apache.tapestry.annotations; + +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Corresponds to {@link BeforeRenderTemplate}, allowing additional markup after rendering the + * component's template. Returning true (the default), will progress to the {@link AfterRender} + * phase. Return false to return to the {@link BeforeRenderTemplate} phase. + */ +@Target(ElementType.METHOD) +@Retention(RUNTIME) +@Documented +public @interface AfterRenderTemplate { + +} Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/CleanupRender.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/CleanupRender.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/CleanupRender.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/annotations/CleanupRender.java Mon Feb 19 15:08:46 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,9 +25,9 @@ * Marker annotation for component methods associated with the terminal phase for the component * rendering state machine. Methods may optionally take a {@link org.apache.tapestry.MarkupWriter} * annotation. Generally, methods marked with this annotation are used to perform post-render - * cleanup. In addition, a method may return true to return to the - * {@link org.apache.tapestry.annotations.SetupRender} phase. Returning false, or void, is the - * normal course. + * cleanup. In addition, a method may return false to return to the + * {@link org.apache.tapestry.annotations.SetupRender} phase. Returning void or true (the default), + * is the normal course. */ @Target(ElementType.METHOD) @Retention(RUNTIME) Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/ActionLink.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/ActionLink.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/ActionLink.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/ActionLink.java Mon Feb 19 15:08:46 2007 @@ -21,8 +21,6 @@ import org.apache.tapestry.ComponentResources; import org.apache.tapestry.Link; import org.apache.tapestry.MarkupWriter; -import org.apache.tapestry.annotations.AfterRender; -import org.apache.tapestry.annotations.BeginRender; import org.apache.tapestry.annotations.Environmental; import org.apache.tapestry.annotations.Inject; import org.apache.tapestry.annotations.Mixin; @@ -60,8 +58,7 @@ @Parameter("false") private boolean _disabled; - @BeginRender - void begin(MarkupWriter writer) + void beginRender(MarkupWriter writer) { if (_disabled) return; @@ -77,8 +74,7 @@ _resources.renderInformalParameters(writer); } - @AfterRender - void end(MarkupWriter writer) + void afterRender(MarkupWriter writer) { if (_disabled) return; Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Form.java Mon Feb 19 15:08:46 2007 @@ -28,16 +28,11 @@ import org.apache.tapestry.TapestryConstants; import org.apache.tapestry.ValidationTracker; import org.apache.tapestry.ValidationTrackerImpl; -import org.apache.tapestry.annotations.AfterRender; -import org.apache.tapestry.annotations.BeginRender; -import org.apache.tapestry.annotations.CleanupRender; import org.apache.tapestry.annotations.Environmental; import org.apache.tapestry.annotations.Inject; import org.apache.tapestry.annotations.Mixin; -import org.apache.tapestry.annotations.OnEvent; import org.apache.tapestry.annotations.Parameter; import org.apache.tapestry.annotations.Persist; -import org.apache.tapestry.annotations.SetupRender; import org.apache.tapestry.corelib.mixins.RenderInformals; import org.apache.tapestry.dom.Element; import org.apache.tapestry.internal.services.FormParameterLookup; @@ -171,8 +166,7 @@ _defaultTracker = defaultTracker; } - @SetupRender - void setup() + void setupRender() { try { @@ -195,8 +189,7 @@ private Element _div; - @BeginRender - void begin(MarkupWriter writer) + void beginRender(MarkupWriter writer) { // Now that the environment is setup, inform the component or other listeners that the form // is about to @@ -230,8 +223,7 @@ } - @AfterRender - void after(MarkupWriter writer) + void afterRender(MarkupWriter writer) { _environment.peek(Heartbeat.class).end(); @@ -253,8 +245,7 @@ _div.element("input", "type", "hidden", "name", FORM_DATA, "value", _actions.toBase64()); } - @CleanupRender - void cleanup() + void cleanupRender() { _environment.pop(FormSupport.class); @@ -269,8 +260,7 @@ private ComponentEventResultProcessor _eventResultProcessor; @SuppressWarnings("unchecked") - @OnEvent("action") - Object onSubmit(Object[] context) + Object onAction(Object[] context) { _tracker.clear(); Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/GridRows.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/GridRows.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/GridRows.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/GridRows.java Mon Feb 19 15:08:46 2007 @@ -102,7 +102,7 @@ { _rowIndex++; - return _rowIndex <= _endRow; + return _rowIndex > _endRow; } public List getPropertyNames() Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Loop.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Loop.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Loop.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Loop.java Mon Feb 19 15:08:46 2007 @@ -326,7 +326,7 @@ if (_formSupport != null) _formSupport.store(this, END_HEARTBEAT); - return _iterator.hasNext(); + return ! _iterator.hasNext(); } private void endHeartbeat() Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/PageLink.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/PageLink.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/PageLink.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/PageLink.java Mon Feb 19 15:08:46 2007 @@ -17,8 +17,6 @@ import org.apache.tapestry.ComponentResources; import org.apache.tapestry.Link; import org.apache.tapestry.MarkupWriter; -import org.apache.tapestry.annotations.AfterRender; -import org.apache.tapestry.annotations.BeginRender; import org.apache.tapestry.annotations.Environmental; import org.apache.tapestry.annotations.Inject; import org.apache.tapestry.annotations.Parameter; @@ -39,8 +37,7 @@ @Environmental private PageRenderSupport _support; - @BeginRender - void begin(MarkupWriter writer) + void beginRender(MarkupWriter writer) { String clientId = _support.allocateClientId(_resources.getId()); @@ -51,8 +48,7 @@ _resources.renderInformalParameters(writer); } - @AfterRender - void end(MarkupWriter writer) + void afterRender(MarkupWriter writer) { writer.end(); // } Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Select.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Select.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Select.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/components/Select.java Mon Feb 19 15:08:46 2007 @@ -28,7 +28,6 @@ import org.apache.tapestry.ValidationException; import org.apache.tapestry.ValidationTracker; import org.apache.tapestry.ValueEncoder; -import org.apache.tapestry.annotations.AfterRender; import org.apache.tapestry.annotations.BeforeRenderTemplate; import org.apache.tapestry.annotations.Environmental; import org.apache.tapestry.annotations.Inject; @@ -228,7 +227,6 @@ writer.attributes(e.getKey(), e.getValue()); } - @AfterRender void afterRender(MarkupWriter writer) { writer.end(); Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderDisabled.java Mon Feb 19 15:08:46 2007 @@ -16,18 +16,19 @@ import org.apache.tapestry.Field; import org.apache.tapestry.MarkupWriter; -import org.apache.tapestry.annotations.BeginRender; import org.apache.tapestry.annotations.InjectComponent; - import org.apache.tapestry.annotations.MixinAfter; + +/** + * Renders an "disabled" attribute if the containing {@link Field#isDisabled() is disabled}. + */ @MixinAfter public class RenderDisabled { @InjectComponent private Field _field; - @BeginRender - void begin(MarkupWriter writer) + void beginRender(MarkupWriter writer) { if (_field.isDisabled()) writer.attributes("disabled", "disabled"); Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/corelib/mixins/RenderInformals.java Mon Feb 19 15:08:46 2007 @@ -43,8 +43,7 @@ @Inject private ComponentResources _resources; - @BeginRender - void write(MarkupWriter writer) + void beginRender(MarkupWriter writer) { _resources.renderInformalParameters(writer); } Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java Mon Feb 19 15:08:46 2007 @@ -117,15 +117,10 @@ private static class RenderPhaseEventHandler implements ComponentEventHandler { - private boolean _result; + private boolean _result = true; private List _commands; - public RenderPhaseEventHandler(boolean defaultResult) - { - _result = defaultResult; - } - boolean getResult() { return _result; @@ -175,7 +170,7 @@ { public void render(final MarkupWriter writer, RenderQueue queue) { - RenderPhaseEventHandler handler = new RenderPhaseEventHandler(false); + RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() @@ -188,7 +183,7 @@ invoke(true, callback); - if (handler.getResult()) + if (!handler.getResult()) queue.push(_beginRender); handler.queueCommands(queue); @@ -205,7 +200,7 @@ { public void render(final MarkupWriter writer, RenderQueue queue) { - RenderPhaseEventHandler handler = new RenderPhaseEventHandler(false); + RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() @@ -218,7 +213,7 @@ invoke(true, callback); - if (handler.getResult()) + if (!handler.getResult()) queue.push(_beforeRenderBody); handler.queueCommands(queue); @@ -235,7 +230,7 @@ { public void render(final MarkupWriter writer, final RenderQueue queue) { - RenderPhaseEventHandler handler = new RenderPhaseEventHandler(false); + RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() @@ -248,7 +243,7 @@ invoke(true, callback); - if (handler.getResult()) + if (!handler.getResult()) queue.push(_beforeRenderTemplate); handler.queueCommands(queue); @@ -265,7 +260,7 @@ { public void render(final MarkupWriter writer, RenderQueue queue) { - RenderPhaseEventHandler handler = new RenderPhaseEventHandler(true); + RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() @@ -297,7 +292,7 @@ { public void render(final MarkupWriter writer, final RenderQueue queue) { - final RenderPhaseEventHandler handler = new RenderPhaseEventHandler(true); + final RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() @@ -329,7 +324,7 @@ { public void render(final MarkupWriter writer, final RenderQueue queue) { - RenderPhaseEventHandler handler = new RenderPhaseEventHandler(true); + RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() @@ -374,7 +369,7 @@ { public void render(final MarkupWriter writer, RenderQueue queue) { - RenderPhaseEventHandler handler = new RenderPhaseEventHandler(false); + RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() @@ -389,10 +384,6 @@ if (handler.getResult()) { - queue.push(_setupRender); - } - else - { _rendering = false; Element current = writer.getElement(); @@ -411,6 +402,10 @@ _page.decrementDirtyCount(); } + else + { + queue.push(_setupRender); + } handler.queueCommands(queue); } @@ -466,7 +461,7 @@ _elementAtSetup = writer.getElement(); - RenderPhaseEventHandler handler = new RenderPhaseEventHandler(true); + RenderPhaseEventHandler handler = new RenderPhaseEventHandler(); final Event event = new EventImpl(handler); ComponentCallback callback = new ComponentCallback() Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/parameters.apt URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/parameters.apt?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/parameters.apt (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/parameters.apt Mon Feb 19 15:08:46 2007 @@ -58,7 +58,7 @@ if (newValue <= _end) { _value = newValue; - return true; + return false; } } else @@ -68,11 +68,11 @@ if (newValue >= _end) { _value = newValue; - return true; + return false; } } - return false; + return true; } } +---+ Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/rendering.apt URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/rendering.apt?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/rendering.apt (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/rendering.apt Mon Feb 19 15:08:46 2007 @@ -40,12 +40,12 @@ Your methods may be void, or return a boolean value. Returning a value can force phases to be skipped, or even be re-visited. In the diagram, solid lines show the normal processing path. Dashed lines are alternate flows that are triggered - when your render phase methods return specific values. + when your render phase methods return false instead of true (or void). Render phase methods may take no parameters, or may take a parameter of type {{{dom.html}MarkupWriter}}. The methods can have any visibility you like ... typically, package private is used, as this visibility - makes it possible to test your code (from within the same Java package) + makes it possible to unit test your code (from within the same Java package) without making the methods part of the component's API. @@ -100,7 +100,7 @@ if (newValue <= _end) { _value = newValue; - return true; + return false; } } else @@ -110,18 +110,18 @@ if (newValue >= _end) { _value = newValue; - return true; + return false; } } - return false; + return true; } } +---+ - Returning true from next() causes Tapestry to re-run the BeginRender phase, + Returning false from next() causes Tapestry to re-run the BeginRender phase, and from there, re-render the component's body (this component does not have a template). - Returning false transitions to the CleanupRender phase. + Returning true transitions to the CleanupRender phase. Notice how Tapestry adapts to your methods, as marked with the annotations. It also adapts in terms of parameters; the two annotated methods here did not perform any @@ -144,10 +144,10 @@ can also prevent the template and/or body from being rendered by returning false. Components may or may not have a template. If a component has a template, - and the template includes a \ element, then the BeforeRenderBody phase + and the template includes a \ element, then the BeforeRenderBody phase will be triggered (giving the component the option of rendering its body or not). - If a component does not have a \ element in its template, then + If a component does not have a \ element in its template, then the BeforeRenderBody phase is not triggered. If a component does not have a template, but does have a body, the BeforeRenderBody @@ -170,7 +170,7 @@ to skip the body, while still rendering the rest of the component's template (if any). If no methods are annotated with BeforeRenderBody, then the body will be rendered by - default. Again, this occurs when the \ element of the component's template + default. Again, this occurs when the \ element of the component's template is reached, or automatically if the component has no template (but the component does have a body). @@ -235,7 +235,7 @@ if (newValue <= _end) { _value = newValue; - return true; + return false; } } else @@ -245,11 +245,11 @@ if (newValue >= _end) { _value = newValue; - return true; + return false; } } - return false; + return true; } } +---+ Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/apt/index.apt?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/site/apt/index.apt (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/site/apt/index.apt Mon Feb 19 15:08:46 2007 @@ -38,6 +38,12 @@ Progress on Tapestry 5 is really taking off. This space lists some cool new features that have been added recently. + * {{{component-parameters.html}Component Reference Documentation}}, generated via a Maven plugin, is now available. + + * The return values for the "after" set of {{{guide/rendering.html}render phase methods}} have changed: all render phase + methods return true (or void) to progress down the default path, and return false to either skip stages or return to earlier + stages. This may break some existing code. + * Component event handlers may now return a {{{apidocs/org/apache/tapestry/StreamResponse.html}StreamResponse}} to directly send a stream to the client web browser (this is intended for components that need to render images, PDF, or other non-page oriented content). Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/images/component-render-states.graffle URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/images/component-render-states.graffle?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/site/images/component-render-states.graffle (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/site/images/component-render-states.graffle Mon Feb 19 15:08:46 2007 @@ -87,7 +87,7 @@ Bounds - {{282.666, 648.779}, {31, 14}} + {{280.166, 648.779}, {36, 14}} Class ShapedGraphic FitText @@ -138,12 +138,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 true} +\f0\fs24 \cf0 false} Bounds - {{519.166, 890.223}, {36, 14}} + {{521.666, 890.223}, {31, 14}} Class ShapedGraphic FitText @@ -194,12 +194,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 false} +\f0\fs24 \cf0 true} Bounds - {{418.762, 828.757}, {31, 14}} + {{416.262, 828.757}, {36, 14}} Class ShapedGraphic FitText @@ -250,12 +250,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 true} +\f0\fs24 \cf0 false} Bounds - {{486.945, 176.879}, {36, 14}} + {{486.944, 176.879}, {36, 14}} Class ShapedGraphic FitText @@ -311,7 +311,7 @@ Bounds - {{347.26, 760.704}, {31, 14}} + {{344.76, 760.704}, {36, 14}} Class ShapedGraphic FitText @@ -362,12 +362,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 true} +\f0\fs24 \cf0 false} Bounds - {{467.794, 803.739}, {36, 14}} + {{470.294, 803.739}, {31, 14}} Class ShapedGraphic FitText @@ -418,12 +418,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 false} +\f0\fs24 \cf0 true} Bounds - {{396.771, 695.173}, {36, 14}} + {{399.272, 695.173}, {31, 14}} Class ShapedGraphic FitText @@ -474,12 +474,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 false} +\f0\fs24 \cf0 true} Bounds - {{372.111, 645.651}, {36, 14}} + {{374.611, 645.65}, {31, 14}} Class ShapedGraphic FitText @@ -530,12 +530,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 false} +\f0\fs24 \cf0 true} Bounds - {{406.172, 500.591}, {36, 14}} + {{406.172, 500.59}, {36, 14}} Class ShapedGraphic FitText @@ -591,7 +591,7 @@ Bounds - {{357.74, 573.112}, {31, 14}} + {{355.24, 573.112}, {36, 14}} Class ShapedGraphic FitText @@ -642,12 +642,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\fs24 \cf0 true} +\f0\fs24 \cf0 false} Bounds - {{243.006, 351.061}, {36, 14}} + {{243.006, 351.06}, {36, 14}} Class ShapedGraphic FitText @@ -759,7 +759,7 @@ Bounds - {{354.692, 261.686}, {31, 14}} + {{354.693, 261.686}, {31, 14}} Class ShapedGraphic FitText @@ -940,7 +940,7 @@ {394.959, 775.836} {176, 695.173} {198, 249} - {379.307, 241.526} + {379.306, 241.526} Style @@ -955,7 +955,7 @@ LineType 1 Pattern - 2 + 1 TailArrow 0 @@ -980,9 +980,9 @@ 39 Points - {379.084, 598.326} + {379.084, 598.325} {365.685, 539.16} - {407.965, 488.709} + {407.965, 488.708} Style @@ -997,7 +997,7 @@ LineType 1 Pattern - 2 + 1 TailArrow 0 @@ -1038,7 +1038,7 @@ LineType 1 Pattern - 2 + 1 TailArrow 0 @@ -1079,7 +1079,7 @@ LineType 1 Pattern - 2 + 1 TailArrow 0 @@ -1104,10 +1104,10 @@ 36 Points - {294.97, 340.638} + {294.969, 340.637} {239.077, 385.325} {239.077, 530.325} - {239.979, 672.325} + {239.98, 672.325} Style @@ -1122,7 +1122,7 @@ LineType 1 Pattern - 2 + 1 TailArrow 0 @@ -1145,10 +1145,10 @@ 67 Points - {479.796, 253.125} + {479.795, 253.125} {604, 329} {625.997, 582} - {583.357, 840.009} + {583.358, 840.009} Style @@ -1163,7 +1163,7 @@ LineType 1 Pattern - 2 + 1 TailArrow 0 @@ -1193,7 +1193,7 @@ {483.224, 166.21} {626.438, 299.939} {648, 614} - {611.202, 841.292} + {611.203, 841.292} Style @@ -1208,7 +1208,7 @@ LineType 1 Pattern - 2 + 1 TailArrow 0 @@ -1220,436 +1220,453 @@ + Bounds + {{488.217, 915.347}, {98, 38}} Class - LineGraphic - Head + ShapedGraphic + FontInfo - ID - 14 + Color + + w + 1 + + Font + TrebuchetMS-Bold + Size + 12 ID - 32 - Points - - {537.141, 879.002} - {537.19, 914.847} - + 14 + Shape + RoundRect Style + fill + + Color + + b + 0 + g + 0 + r + 1 + + GradientColor + + b + 0 + g + 0.501961 + r + 0 + + MiddleFraction + 0.0 + stroke - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 + CornerRadius + 5 - Tail + Text - ID - 13 + Text + {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural + +\f0\b\fs24 \cf1 End} + Bounds + {{447.901, 840.502}, {180.5, 38}} Class - LineGraphic - Head + ShapedGraphic + FontInfo - ID - 13 + Color + + b + 0 + g + 0 + r + 0 + + Font + TrebuchetMS-Bold + Size + 12 ID - 31 - Points + 13 + Magnets - {485.209, 794.836} - {486.889, 840.502} + {-0.281146, -0.13158} + {0.25, -0.5} + {-0.00563669, 0.368422} + {0.433564, -0.5} + Shape + RoundRect Style + fill + + Color + + b + 0 + g + 0.8 + r + 1 + + GradientColor + + b + 0 + g + 0.501961 + r + 0 + + MiddleFraction + 0.0 + stroke - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 + CornerRadius + 5 - Tail + Text - ID - 12 + Text + {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural + +\f0\b\fs24 \cf0 CleanupRender} + Bounds + {{394.959, 756.836}, {180.5, 38}} Class - LineGraphic - Head + ShapedGraphic + FontInfo - ID - 12 - Info - 3 + Color + + b + 0 + g + 0 + r + 0 + + Font + TrebuchetMS-Bold + Size + 12 ID - 30 - Points + 12 + Magnets - {388.868, 690.48} - {463, 726} - {485.209, 756.836} + {-0.5, 0} + {0, 0.5} + {0, -0.5} + Shape + RoundRect Style + fill + + Color + + b + 0 + g + 0.8 + r + 1 + + GradientColor + + b + 0 + g + 0.501961 + r + 0 + + MiddleFraction + 0.0 + stroke - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 + CornerRadius + 5 - Tail + Text - ID - 11 - - + Text + {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural + +\f0\b\fs24 \cf0 AfterRender} + + + Bounds + {{207.959, 672.325}, {180.5, 38}} Class - LineGraphic - Head + ShapedGraphic + FontInfo - ID - 11 + Color + + b + 0 + g + 0 + r + 0 + + Font + TrebuchetMS-Bold + Size + 12 ID - 29 - Points + 11 + Magnets - {422.134, 636.55} - {350.979, 672.325} + {-0.322601, -0.5} + {-5.96046e-08, -0.5} + {-5.96046e-08, 0.5} + {0.292358, -0.5} + Shape + RoundRect Style + fill + + Color + + b + 0 + g + 0.8 + r + 1 + + GradientColor + + b + 0 + g + 0.501961 + r + 0 + + MiddleFraction + 0.0 + stroke - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 + CornerRadius + 5 - Tail + Text - ID - 9 + Text + {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural + +\f0\b\fs24 \cf0 AfterRenderTemplate} + Bounds + {{445.497, 529.727}, {180.5, 38}} Class - LineGraphic - Head + ShapedGraphic + FontInfo - ID - 9 + Color + + b + 0 + g + 0 + r + 0 + + Font + TrebuchetMS-Bold + Size + 12 ID - 28 - Points - - {504.428, 567.989} - {461.524, 598.039} - + 10 + Shape + Parallelogram Style + fill + + Color + + b + 0.4 + g + 1 + r + 1 + + GradientColor + + b + 0 + g + 0.501961 + r + 0 + + MiddleFraction + 0.0 + stroke - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 + CornerRadius + 5 - Tail + Text - ID - 10 + Text + {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural + +\f0\b\fs24 \cf0 Render Body} + Bounds + {{333.959, 598.325}, {180.5, 38}} Class - LineGraphic - Head + ShapedGraphic + FontInfo - ID - 10 + Color + + b + 0 + g + 0 + r + 0 + + Font + TrebuchetMS-Bold + Size + 12 ID - 27 - Points + 9 + Magnets - {499.152, 486.714} - {531.959, 494.325} - {534.389, 529.229} + {-0.00127089, -0.281658} + {-0.25, -0.499999} + {-0.00127089, 0.481501} + {0.170474, -0.386921} + Shape + RoundRect Style + fill + + Color + + b + 0 + g + 0.8 + r + 1 + + GradientColor + + b + 0 + g + 0.501961 + r + 0 + + MiddleFraction + 0.0 + stroke - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 + CornerRadius + 5 - Tail + Text - ID - 8 + Text + {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural + +\f0\b\fs24 \cf0 AfterRenderBody} + Bounds + {{333.959, 450.325}, {180.5, 38}} Class - LineGraphic - Head + ShapedGraphic + FontInfo - ID - 8 - - ID - 26 - Points - - {424.209, 411.79} - {424.209, 449.825} - - Style - - stroke - - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 - - - Tail - - ID - 7 - - - - Class - LineGraphic - Head - - ID - 7 - - ID - 25 - Points - - {362.891, 340.648} - {401.267, 372.968} - - Style - - stroke - - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow - 0 - - - Tail - - ID - 6 - - - - Class - LineGraphic - Head - - ID - 6 - - ID - 71 - Points - - {393.365, 258.464} - {357.74, 276} - {338.051, 301.927} - - Style - - stroke + Color - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow + b 0 - - - Tail - - ID - 66 - - - - Class - LineGraphic - Head - - ID - 66 - - ID - 69 - Points - - {432.419, 176.439} - {432.27, 220.345} - - Style - - stroke - - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow + g 0 - - - Tail - - ID - 4 - - - - Class - LineGraphic - Head - - ID - 4 - - ID - 22 - Points - - {431.478, 106.061} - {432.205, 137.939} - - Style - - stroke - - HeadArrow - FilledArrow - HopLines - - HopType - 1 - LineType - 1 - TailArrow + r 0 - - Tail - - ID - 3 - - - - Bounds - {{488.217, 915.347}, {98, 38}} - Class - ShapedGraphic - FontInfo - - Color - - w - 1 - Font TrebuchetMS-Bold Size 12 ID - 14 + 8 Shape RoundRect Style @@ -1661,7 +1678,7 @@ b 0 g - 0 + 0.8 r 1 @@ -1691,12 +1708,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\b\fs24 \cf1 End} +\f0\b\fs24 \cf0 BeforeRenderBody} Bounds - {{447.901, 840.502}, {180.5, 38}} + {{333.959, 373.29}, {180.5, 38}} Class ShapedGraphic FontInfo @@ -1716,16 +1733,9 @@ 12 ID - 13 - Magnets - - {-0.281146, -0.13158} - {0.25, -0.5} - {-0.00563669, 0.368422} - {0.433564, -0.5} - + 7 Shape - RoundRect + Parallelogram Style fill @@ -1733,9 +1743,9 @@ Color b - 0 + 0.4 g - 0.8 + 1 r 1 @@ -1765,12 +1775,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\b\fs24 \cf0 CleanupRender} +\f0\b\fs24 \cf0 Render Template} Bounds - {{394.959, 756.836}, {180.5, 38}} + {{235.205, 302.325}, {180.5, 38}} Class ShapedGraphic FontInfo @@ -1790,12 +1800,10 @@ 12 ID - 12 + 6 Magnets - {-0.5, 0} - {0, 0.5} - {0, -0.5} + {0.0241081, -0.224772} Shape RoundRect @@ -1838,12 +1846,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\b\fs24 \cf0 AfterRender} +\f0\b\fs24 \cf0 BeforeRenderTemplate} Bounds - {{207.959, 672.325}, {180.5, 38}} + {{379.705, 220.345}, {105, 38}} Class ShapedGraphic FontInfo @@ -1863,13 +1871,13 @@ 12 ID - 11 + 66 Magnets - {-0.322601, -0.5} - {-5.96046e-08, -0.5} - {-5.96046e-08, 0.5} - {0.292358, -0.5} + {0, 0} + {-0.5, 0} + {0.453242, 0.362622} + {0.25, 0.25} Shape RoundRect @@ -1912,12 +1920,12 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\b\fs24 \cf0 AfterRenderTemplate} +\f0\b\fs24 \cf0 BeginRender} Bounds - {{445.497, 529.727}, {180.5, 38}} + {{379.705, 137.939}, {105, 38}} Class ShapedGraphic FontInfo @@ -1937,9 +1945,16 @@ 12 ID - 10 + 4 + Magnets + + {0.411739, 0.0526314} + {0.00221539, 0.368421} + {0, -0.5} + {-0.445207, 0.0526316} + Shape - Parallelogram + RoundRect Style fill @@ -1947,9 +1962,9 @@ Color b - 0.4 + 0 g - 1 + 0.8 r 1 @@ -1979,24 +1994,20 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\b\fs24 \cf0 Render Body} +\f0\b\fs24 \cf0 SetupRender} Bounds - {{333.959, 598.325}, {180.5, 38}} + {{382.2, 67.5615}, {98, 38}} Class ShapedGraphic FontInfo Color - b - 0 - g - 0 - r - 0 + w + 1 Font TrebuchetMS-Bold @@ -2004,14 +2015,7 @@ 12 ID - 9 - Magnets - - {-0.00127089, -0.281658} - {-0.25, -0.499999} - {-0.00127089, 0.481501} - {0.170474, -0.386921} - + 3 Shape RoundRect Style @@ -2023,9 +2027,9 @@ b 0 g - 0.8 + 0.501961 r - 1 + 0 GradientColor @@ -2053,423 +2057,443 @@ {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural -\f0\b\fs24 \cf0 AfterRenderBody} +\f0\b\fs24 \cf1 Start} - Bounds - {{333.959, 450.325}, {180.5, 38}} Class - ShapedGraphic - FontInfo + LineGraphic + Head - Color + ID + 4 + + ID + 41 + Points + + {458.994, 843.755} + {153, 728} + {146, 242} + {379.562, 160.984} + + Style + + stroke - b - 0 - g - 0 - r + HeadArrow + FilledArrow + HopLines + + HopType + 2 + LineType + 1 + Pattern + 1 + TailArrow 0 - Font - TrebuchetMS-Bold - Size - 12 + + Tail + + ID + 13 + + + + Class + LineGraphic + Head + + ID + 14 ID - 8 - Shape - RoundRect + 32 + Points + + {537.141, 879.002} + {537.19, 914.847} + Style - fill - - Color - - b - 0 - g - 0.8 - r - 1 - - GradientColor - - b - 0 - g - 0.501961 - r - 0 - - MiddleFraction - 0.0 - stroke - CornerRadius - 5 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 - Text + Tail - Text - {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 -{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs24 \cf0 BeforeRenderBody} + ID + 13 - Bounds - {{333.959, 373.29}, {180.5, 38}} Class - ShapedGraphic - FontInfo + LineGraphic + Head - Color + ID + 13 + + ID + 31 + Points + + {485.209, 794.836} + {486.889, 840.502} + + Style + + stroke - b - 0 - g - 0 - r + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow 0 + Width + 2 - Font - TrebuchetMS-Bold - Size - 12 + + Tail + + ID + 12 + + + + Class + LineGraphic + Head + + ID + 12 + Info + 3 ID - 7 - Shape - Parallelogram + 30 + Points + + {388.868, 690.479} + {463, 726} + {485.209, 756.836} + Style - fill + stroke - Color - - b - 0.4 - g - 1 - r - 1 - - GradientColor - - b - 0 - g - 0.501961 - r - 0 - - MiddleFraction - 0.0 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 + + Tail + + ID + 11 + + + + Class + LineGraphic + Head + + ID + 11 + + ID + 29 + Points + + {422.135, 636.55} + {350.98, 672.325} + + Style + stroke - CornerRadius - 5 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 - Text + Tail - Text - {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 -{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs24 \cf0 Render Template} + ID + 9 - Bounds - {{235.205, 302.325}, {180.5, 38}} Class - ShapedGraphic - FontInfo + LineGraphic + Head - Color + ID + 9 + + ID + 28 + Points + + {504.428, 567.989} + {461.524, 598.038} + + Style + + stroke - b - 0 - g - 0 - r + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow 0 + Width + 2 - Font - TrebuchetMS-Bold - Size - 12 + + Tail + + ID + 10 + + + + Class + LineGraphic + Head + + ID + 10 ID - 6 - Magnets + 27 + Points - {0.0241081, -0.224772} + {499.152, 486.713} + {531.959, 494.325} + {534.389, 529.228} - Shape - RoundRect Style - fill + stroke - Color - - b - 0 - g - 0.8 - r - 1 - - GradientColor - - b - 0 - g - 0.501961 - r - 0 - - MiddleFraction - 0.0 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 + + Tail + + ID + 8 + + + + Class + LineGraphic + Head + + ID + 8 + + ID + 26 + Points + + {424.209, 411.79} + {424.209, 449.825} + + Style + stroke - CornerRadius - 5 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 - Text + Tail - Text - {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 -{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs24 \cf0 BeforeRenderTemplate} + ID + 7 - Bounds - {{379.705, 220.345}, {105, 38}} Class - ShapedGraphic - FontInfo + LineGraphic + Head - Color - - b - 0 - g - 0 - r - 0 - - Font - TrebuchetMS-Bold - Size - 12 + ID + 7 ID - 66 - Magnets + 25 + Points - {0, 0} - {-0.5, 0} - {0.453242, 0.362622} - {0.25, 0.25} + {362.89, 340.647} + {401.267, 372.968} - Shape - RoundRect Style - fill - - Color - - b - 0 - g - 0.8 - r - 1 - - GradientColor - - b - 0 - g - 0.501961 - r - 0 - - MiddleFraction - 0.0 - stroke - CornerRadius - 5 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 - Text + Tail - Text - {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 -{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs24 \cf0 BeginRender} + ID + 6 - Bounds - {{379.705, 137.939}, {105, 38}} Class - ShapedGraphic - FontInfo + LineGraphic + Head - Color - - b - 0 - g - 0 - r - 0 - - Font - TrebuchetMS-Bold - Size - 12 + ID + 6 ID - 4 - Magnets + 71 + Points - {0.411739, 0.0526314} - {0.00221539, 0.368421} - {0, -0.5} - {-0.445207, 0.0526316} + {393.365, 258.464} + {357.74, 276} + {338.051, 301.927} - Shape - RoundRect Style - fill - - Color - - b - 0 - g - 0.8 - r - 1 - - GradientColor - - b - 0 - g - 0.501961 - r - 0 - - MiddleFraction - 0.0 - stroke - CornerRadius - 5 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 - Text + Tail - Text - {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 -{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs24 \cf0 SetupRender} + ID + 66 - Bounds - {{382.2, 67.5615}, {98, 38}} Class - ShapedGraphic - FontInfo + LineGraphic + Head - Color - - w - 1 - - Font - TrebuchetMS-Bold - Size - 12 + ID + 66 ID - 3 - Shape - RoundRect + 69 + Points + + {432.419, 176.439} + {432.27, 220.345} + Style - fill - - Color - - b - 0 - g - 0.501961 - r - 0 - - GradientColor - - b - 0 - g - 0.501961 - r - 0 - - MiddleFraction - 0.0 - stroke - CornerRadius - 5 + HeadArrow + FilledArrow + HopLines + + HopType + 1 + LineType + 1 + TailArrow + 0 + Width + 2 - Text + Tail - Text - {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420 -{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;} -{\colortbl;\red255\green255\blue255;} -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural - -\f0\b\fs24 \cf1 Start} + ID + 4 @@ -2481,13 +2505,11 @@ 4 ID - 41 + 22 Points - {458.994, 843.755} - {153, 728} - {146, 242} - {379.562, 160.984} + {431.478, 106.061} + {432.205, 137.939} Style @@ -2498,19 +2520,19 @@ HopLines HopType - 2 + 1 LineType 1 - Pattern - 2 TailArrow 0 + Width + 2 Tail ID - 13 + 3 @@ -2613,7 +2635,7 @@ ModificationDate - 2006-12-20 14:05:51 -0800 + 2007-02-19 13:13:13 -0800 Modifier Howard Lewis Ship NotesVisible Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/resources/images/component-render-states.png URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/resources/images/component-render-states.png?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== Binary files - no diff available. Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/corelib/components/LoopTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/corelib/components/LoopTest.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/corelib/components/LoopTest.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/corelib/components/LoopTest.java Mon Feb 19 15:08:46 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -52,17 +52,17 @@ assertEquals(loop.getValue(), "alpha"); assertEquals(loop.getIndex(), 0); - assertTrue(loop.after()); + assertFalse(loop.after()); loop.begin(); assertEquals(loop.getValue(), "beta"); assertEquals(loop.getIndex(), 1); - assertTrue(loop.after()); + assertFalse(loop.after()); loop.begin(); assertEquals(loop.getValue(), "gamma"); assertEquals(loop.getIndex(), 2); - assertFalse(loop.after()); + assertTrue(loop.after()); verify(); } Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Count.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Count.java?view=diff&rev=509372&r1=509371&r2=509372 ============================================================================== --- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Count.java (original) +++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Count.java Mon Feb 19 15:08:46 2007 @@ -56,7 +56,7 @@ if (newValue <= _end) { _value = newValue; - return true; // re-render body + return false; // re-render body } } else @@ -66,10 +66,10 @@ if (newValue >= _end) { _value = newValue; - return true; // re-render body + return false; // re-render body } } - return false; + return true; } }