Author: buildbot
Date: Mon Oct 14 14:20:35 2013
New Revision: 882543
Log:
Production update by buildbot for tapestry
Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/component-rendering.html
Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/tapestry/content/component-rendering.html
==============================================================================
--- websites/production/tapestry/content/component-rendering.html (original)
+++ websites/production/tapestry/content/component-rendering.html Mon Oct 14
14:20:35 2013
@@ -116,10 +116,10 @@ Each of the orange phases (SetupRender,
<p>Render phase methods may take no parameters, or may take a parameter of
type <a shape="rect" href="dom.html" title="DOM">MarkupWriter</a>. The methods
can have any visibility you like ... typically, package private is used, as
this visibility makes it possible to unit test your code (from within the same
Java package) without making the methods part of the component's
<em>public</em> API.</p>
-<p>These methods are <b>optional</b>, a default behavior is associated with
each phase.</p>
+<p>All Render phase methods are <em>optional</em>; a default behavior is
associated with each phase.</p>
<div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Annotation </th><th colspan="1" rowspan="1"
class="confluenceTh"> Method Name </th><th colspan="1" rowspan="1"
class="confluenceTh"> When Called </th><td colspan="1" rowspan="1"
class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <b><a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SetupRender.html">@SetupRender</a></b>
</td><td colspan="1" rowspan="1" class="confluenceTd"> setupRender() </td><td
colspan="1" rowspan="1" class="confluenceTd"> When initial setup actions, if
any, are needed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<b><a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender">@BeginRender</a></b>
</td><td colspan="1" rowspan="1" class="confluenceTd"> beginRender() </td><td
col
span="1" rowspan="1" class="confluenceTd"> When Tapestry is ready for the
component's start tag, if any, to be rendered </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderTemplate">@BeforeRenderTemplate</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> beforeRenderTemplate()
</td><td colspan="1" rowspan="1" class="confluenceTd"> Before Tapestry renders
the component's template, if any </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderBody">@BeforeRenderBody</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> beforeRenderBody()
</td><td colspan="1" rowspan="1" class="confluenceTd"> Before Tapestry renders
the body of the component, if any </td></tr><tr><td colspan="1" rowspan="1" cl
ass="confluenceTd"> <a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderBody">@AfterRenderBody</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> afterRenderBody()
</td><td colspan="1" rowspan="1" class="confluenceTd"> After Tapestry renders
the body of the component, if any, but before the rest of the component's
template is rendered </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderTemplate">@AfterRenderTemplate</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> afterRenderTemplate()
</td><td colspan="1" rowspan="1" class="confluenceTd"> After Tapestry finishes
rendering the component's template, if any </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <b><a shape="rect" class="external-link"
href="http://tapestry.apache.org/curren
t/apidocs/org/apache/tapestry5/annotations/AfterRender">@AfterRender</a></b>
</td><td colspan="1" rowspan="1" class="confluenceTd"> afterRender() </td><td
colspan="1" rowspan="1" class="confluenceTd"> After Tapestry has finished
rendering both the template and body of the component </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <b><a shape="rect"
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/CleanupRender">@CleanupRender</a></b>
</td><td colspan="1" rowspan="1" class="confluenceTd"> cleanupRender()
</td><td colspan="1" rowspan="1" class="confluenceTd"> When final cleanup
actions, if any, are needed </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Annotation </th><th colspan="1" rowspan="1"
class="confluenceTh"> Method Name </th><th colspan="1" rowspan="1"
class="confluenceTh"> When Called </th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <b><a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SetupRender.html">@SetupRender</a></b>
</td><td colspan="1" rowspan="1" class="confluenceTd"> setupRender() </td><td
colspan="1" rowspan="1" class="confluenceTd"> When initial setup actions, if
any, are needed </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
<b><a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender">@BeginRender</a></b>
</td><td colspan="1" rowspan="1" class="confluenceTd"> beginRender() </td><td
colspan="1" rowspan="1" class="confluenceTd"> When Tapestry is
ready for the component's start tag, if any, to be rendered </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect"
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderTemplate">@BeforeRenderTemplate</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> beforeRenderTemplate()
</td><td colspan="1" rowspan="1" class="confluenceTd"> Before Tapestry renders
the component's template, if any </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeforeRenderBody">@BeforeRenderBody</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> beforeRenderBody()
</td><td colspan="1" rowspan="1" class="confluenceTd"> Before Tapestry renders
the body of the component, if any </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <a shape="rect" class="external-link" hr
ef="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderBody">@AfterRenderBody</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> afterRenderBody()
</td><td colspan="1" rowspan="1" class="confluenceTd"> After Tapestry renders
the body of the component, if any, but before the rest of the component's
template is rendered </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> <a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRenderTemplate">@AfterRenderTemplate</a>
</td><td colspan="1" rowspan="1" class="confluenceTd"> afterRenderTemplate()
</td><td colspan="1" rowspan="1" class="confluenceTd"> After Tapestry finishes
rendering the component's template, if any </td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"> <b><a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/AfterRender">@Aft
erRender</a></b> </td><td colspan="1" rowspan="1" class="confluenceTd">
afterRender() </td><td colspan="1" rowspan="1" class="confluenceTd"> After
Tapestry has finished rendering both the template and body of the component
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <b><a
shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/CleanupRender">@CleanupRender</a></b>
</td><td colspan="1" rowspan="1" class="confluenceTd"> cleanupRender()
</td><td colspan="1" rowspan="1" class="confluenceTd"> When final cleanup
actions, if any, are needed </td></tr></tbody></table>
</div>
@@ -127,6 +127,8 @@ Each of the orange phases (SetupRender,
<p>Generally, your code will use the SetupRender, BeginRender, AfterRender and
CleanupRender phases ... often just one or two of those.</p>
+<h2><a shape="rect" name="ComponentRendering-AnExample"></a>An Example</h2>
+
<p>Here's the source for a looping component that counts up or down between
two values, renders its body a number of times, and stores the current index
value in a parameter:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
@@ -194,6 +196,11 @@ public class Count
<p>What's really mind blowing is that the template and body of a component
will often contain ... more components! That means that many different
components will be in different phases of their own state machine.</p>
+<h2><a shape="rect" name="ComponentRendering-RenderPhasesinDetail"></a>Render
Phases in Detail</h2>
+
+
+<div class="navmenu" style="float:right; width:50%; background:#eee;
margin:3px; padding:3px"><div class="panelMacro"><table
class="noteMacro"><colgroup span="1"><col span="1" width="24"><col
span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img
align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">The
SetupRender phase, like all render phases, occurs once for each rendering of
the component. If the component is inside a looping component (<a shape="rect"
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Loop.html">Loop</a>,
<a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html">Grid</a>,
etc.), then the SetupRender method will be called once for <em>each</em>
iteration of the loop.</td></tr></table></div></div>
+
<h3><a shape="rect" name="ComponentRendering-SetupRender"></a>SetupRender</h3>
<p>The SetupRender phase (see @<a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SetupRender.html">SetupRender</a>)
is where you can perform any one-time per-render setup for your component.
This is a good place to read component parameters and use them to set temporary
instance variables.</p>