You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bu...@apache.org on 2013/12/22 14:21:10 UTC

svn commit: r891458 [1/3] - in /websites/production/tapestry/content: cache/main.pageCache component-classes.html component-templates.html implementing-the-hi-lo-guessing-game.html

Author: buildbot
Date: Sun Dec 22 13:21:09 2013
New Revision: 891458

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/cache/main.pageCache
    websites/production/tapestry/content/component-classes.html
    websites/production/tapestry/content/component-templates.html
    websites/production/tapestry/content/implementing-the-hi-lo-guessing-game.html

Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/tapestry/content/component-classes.html
==============================================================================
--- websites/production/tapestry/content/component-classes.html (original)
+++ websites/production/tapestry/content/component-classes.html Sun Dec 22 13:21:09 2013
@@ -29,6 +29,7 @@
   <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
   <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
   <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
   <script type="text/javascript">
   SyntaxHighlighter.defaults['toolbar'] = false;
   SyntaxHighlighter.all();
@@ -69,9 +70,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><h1 id="ComponentClasses-ComponentClasses">Component Classes</h1>
-
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
+<div id="ConfluenceContent"><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
 <h3>Related Articles</h3>
 <ul class="content-by-label"><li>
             <div>
@@ -114,7 +113,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="component-templates.html">Component Templates</a>
+                            <a shape="rect" href="component-libraries.html">Component Libraries</a>
                     
                 
                             </div>
@@ -123,55 +122,24 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="component-libraries.html">Component Libraries</a>
+                            <a shape="rect" href="component-templates.html">Component Templates</a>
                     
                 
                             </div>
         </li></ul>
-</div> 
-
-<p>A <strong>Component class</strong> is the class associated with a page, component or mixin in your Tapestry web application. Classes for pages, components and mixins are all created in an identical way. They are pure POJOs (Plain Old Java Objects), typically with annotations and conventionally named methods.  They are not <em>abstract</em>, nor do they need to extend base classes or implement interfaces.</p>
-
-<p><em>For Tapestry 4 Users: Component classes in Tapestry 5 are much easier than in Tapestry 4. There are no base classes to extend from, the classes are concrete (not abstract), and there's no XML file. There is still a bit of configuration in the form of Java annotations, but those now go directly onto fields of your class, rather than on abstract getters and setters.</em></p>
-
-<p>In most cases, each component class will have a corresponding <a shape="rect" href="component-templates.html">component template</a>.  However, it is also possible for a component class to emit all of its markup itself, without using a template.</p>
-
-<h2 id="ComponentClasses-CreatingaTrivialComponent">Creating a Trivial Component</h2>
-
-<p>Creating a page or component in Tapestry 5 is a breeze. There are only a few constraints:</p>
-
-<ul><li>There must be a public Java class.</li><li>The class must be in the correct package (see below).</li><li>The class must have a public, no-arguments constructor. (The default one provided by the compiler is fine.)</li></ul>
-
-
-<p>Here's a minimal component that outputs a fixed message, using a <a shape="rect" href="component-templates.html">template</a> with a matching file name:</p>
-
-<div class="sectionColumnWrapper"><div class="sectionMacro">
-<div class="sectionMacroRow"><div class="columnMacro">
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>HelloWorld.java</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-package org.example.myapp.components;
+</div><p>A <strong>component class</strong>&#160;is the class associated with a page, component or mixin in your Tapestry web application. Classes for pages, components and mixins are all created in an identical way. They are pure POJOs (Plain Old Java Objects), typically with annotations and conventionally named methods. They are not <em>abstract</em>, nor do they need to extend base classes or implement interfaces.</p><p><em>For Tapestry 4 Users: Component classes in Tapestry 5 are much easier than in Tapestry 4. There are no base classes to extend from, the classes are concrete (not abstract), and there's no XML file. There is still a bit of configuration in the form of Java annotations, but those now go directly onto fields of your class, rather than on abstract getters and setters.</em></p><p>In most cases, each component class will have a corresponding <a shape="rect" href="component-templates.html">component template</a>. However, it is also possible for a component class to 
 emit all of its markup itself, without using a template.</p><h2 id="ComponentClasses-CreatingaTrivialComponent">Creating a Trivial Component</h2><p>Creating a page or component in Tapestry 5 is a breeze. There are only a few constraints:</p><ul><li>There must be a public Java class.</li><li>The class must be in the correct package (see below).</li><li>The class must have a public, no-arguments constructor. (The default one provided by the compiler is fine.)</li></ul><p>Here's a minimal component that outputs a fixed message, using a <a shape="rect" href="component-templates.html">template</a> with a matching file name:</p><div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro"><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>HelloWorld.java</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[package org.example.myapp.components;
 public class HelloWorld
 {
 }
 ]]></script>
-</div></div></div>
-
-<div class="columnMacro">
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>HelloWorld.tml</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;html&gt;
+</div></div></div><div class="columnMacro"><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>HelloWorld.tml</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;html&gt;
     Bonjour from HelloWorld component.
 &lt;/html&gt;
 ]]></script>
-</div></div></div></div></div></div>
-
-<p>In the example above, the HelloWorld class contains no code at all (except what it inherits from the Object class and what Tapestry adds invisibly).</p>
-
-<p>And here's a component that does the same thing, but without needing a template:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>HelloWorld.java &#8211; without a template</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-package org.example.myapp.components;
+</div></div></div></div></div></div><p>In the example above, the HelloWorld class contains no code at all (except what it inherits from the Object class and what Tapestry adds invisibly).</p><p>And here's a component that does the same thing, but without needing a template:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>HelloWorld.java &#8211; without a template</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[package org.example.myapp.components;
 
 import org.apache.tapestry5.MarkupWriter;
 import org.apache.tapestry5.annotations.BeginRender;
@@ -185,111 +153,31 @@ public class HelloWorld
     }
 }
 ]]></script>
-</div></div>
-
-<p>In this example, just like the first one, the component's only job is to write out a fixed message. The @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender.html">BeginRender</a> annotation is a type of <em><a shape="rect" href="component-rendering.html">render phase annotation</a></em>, a method annotation that instructs Tapestry when and under what circumstances to invoke methods of your class.</p>
-
-<p>These methods are not necessarily public; they can have any access level you like (unlike in Tapestry 4). By convention they usually have package-private access level (the default).</p>
-
-<h2 id="ComponentClasses-ComponentPackages">Component Packages</h2>
-
-<p>Component classes must exist within an appropriate package (this is necessary for runtime code transformation and class reloading to operate).</p>
-
-<p>These packages exist under the application's root package, as follows:</p>
-
-<ul><li>For pages, place classes in <em>root</em>.<strong>pages</strong>. Page names are mapped to classes within this package.</li><li>For mixins, place classes in <em>root</em>.<strong>mixins</strong>. Mixin types are mapped to classes within this package.</li><li>For other components, place classes in <em>root</em>.<strong>components</strong>. Component types are mapped to classes within this package.</li></ul>
-
-
-<p>In addition, it is common for an application to have base classes, often <em>abstract</em> base classes, that should not be directly referenced. These should <em>not</em> go in the <strong>pages</strong>, <strong>components</strong> or <strong>mixins</strong> packages, because they then look like valid pages, components or mixins. Instead, use the <em>root</em>.<strong>base</strong> package to store such base classes.</p>
-
-    <div class="aui-message problem shadowed information-macro">
+</div></div><p>In this example, just like the first one, the component's only job is to write out a fixed message. The @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/BeginRender.html">BeginRender</a> annotation is a type of <em><a shape="rect" href="component-rendering.html">render phase annotation</a></em>, a method annotation that instructs Tapestry when and under what circumstances to invoke methods of your class.</p><p>These methods are not necessarily public; they can have any access level you like (unlike in Tapestry 4). By convention they usually have package-private access level (the default).</p><h2 id="ComponentClasses-ComponentPackages">Component Packages</h2><p>Component classes must exist within an appropriate package (this is necessary for runtime code transformation and class reloading to operate).</p><p>These packages exist under the application's root package, as follows:</p><ul><li>For pages,
  place classes in <em>root</em>.<strong>pages</strong>. Page names are mapped to classes within this package.</li><li>For mixins, place classes in <em>root</em>.<strong>mixins</strong>. Mixin types are mapped to classes within this package.</li><li>For other components, place classes in <em>root</em>.<strong>components</strong>. Component types are mapped to classes within this package.</li></ul><p>In addition, it is common for an application to have base classes, often <em>abstract</em> base classes, that should not be directly referenced. These should <em>not</em> go in the <strong>pages</strong>, <strong>components</strong> or <strong>mixins</strong> packages, because they then look like valid pages, components or mixins. Instead, use the <em>root</em>.<strong>base</strong> package to store such base classes.</p>    <div class="aui-message problem shadowed information-macro">
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
-                            
-<p>Only component classes should go in any of these controlled packages; classes representing data, or interfaces, or anything that isn't precisely a component class, must go elsewhere. Any top-level class in any of the controlled packages will be transformed at runtime.  The only exception is inner classes<br clear="none">
-(anonymous or not), which are loaded by the same class loader as the component class loader, but not transformed as components.</p>
+                            <p>Only component classes should go in any of these controlled packages; classes representing data, or interfaces, or anything that isn't precisely a component class, must go elsewhere. Any top-level class in any of the controlled packages will be transformed at runtime. The only exception is inner classes<br clear="none"> (anonymous or not), which are loaded by the same class loader as the component class loader, but not transformed as components.</p>
                     </div>
     </div>
-
-
-
-<h2 id="ComponentClasses-Sub-Folders/Sub-Packages">Sub-Folders / Sub-Packages</h2>
-
-<p>Classes do not have to go directly inside the package (pages, components, mixins, etc.). It is valid to create a sub-package to store some of the classes. The sub-package name becomes part of the page name or component type. Thus you might define a page component <code>com.example.myapp.pages.admin.CreateUser</code> and the logical page name (which often shows up inside URLs) will be <strong>admin/CreateUser</strong>.</p>
-
-<p>Tapestry performs some simple optimizations of the logical page name (or component type, or mixin type). It checks to see if the package name is either a prefix or a suffix of the unqualified class name (case insensitively, of course) and removes the prefix or suffix if so. The net result is that a class name such as <code>com.example.myapp.pages.user.EditUser</code> will have a page name of <code>user/Edit</code> (<em>not</em> <code>user/EditUser</code>). The goal here is to provide shorter, more natural URLs.</p>
-
-<h2 id="ComponentClasses-IndexPages">Index Pages</h2>
-
-<p>One special simplification are Index pages: if the logical page name is Index after removing the package name from the unqualified class name, it will map to the root of that folder. A class such as <code>com.example.myapp.pages.user.IndexUser</code> or <code>com.example.myapp.pages.user.UserIndex</code> will have a page name of <code>user/</code>.</p>
-
-<p>In previous versions of Tapestry there was also the concept of a start page configured with the <code><a shape="rect" href="configuration.html#Configuration-tapestry.startpagename">tapestry.start-page-name</a></code> configuration symbol (defaults to "start"). If a page with a name as configured with that symbol exists at the root level, this page is used as the root URL. This has precedence over an existing Index page. If for example you have a page class <code>com.example.myapp.pages.Start</code> it will map to <code>/</code>.</p>
-
-    <div class="aui-message problem shadowed information-macro">
+<h2 id="ComponentClasses-Sub-Folders/Sub-Packages">Sub-Folders / Sub-Packages</h2><p>Classes do not have to go directly inside the package (pages, components, mixins, etc.). It is valid to create a sub-package to store some of the classes. The sub-package name becomes part of the page name or component type. Thus you might define a page component <code>com.example.myapp.pages.admin.CreateUser</code> and the logical page name (which often shows up inside URLs) will be <strong>admin/CreateUser</strong>.</p><p>Tapestry performs some simple optimizations of the logical page name (or component type, or mixin type). It checks to see if the package name is either a prefix or a suffix of the unqualified class name (case insensitively, of course) and removes the prefix or suffix if so. The net result is that a class name such as <code>com.example.myapp.pages.user.EditUser</code> will have a page name of <code>user/Edit</code> (<em>not</em> <code>user/EditUser</code>). The goal here is to pro
 vide shorter, more natural URLs.</p><h2 id="ComponentClasses-IndexPages">Index Pages</h2><p>One special simplification are Index pages: if the logical page name is Index after removing the package name from the unqualified class name, it will map to the root of that folder. A class such as <code>com.example.myapp.pages.user.IndexUser</code> or <code>com.example.myapp.pages.user.UserIndex</code> will have a page name of <code>user/</code>.</p><p>In previous versions of Tapestry there was also the concept of a start page configured with the <code><a shape="rect" href="configuration.html#Configuration-tapestry.startpagename">tapestry.start-page-name</a></code> configuration symbol (defaults to "start"). If a page with a name as configured with that symbol exists at the root level, this page is used as the root URL. This has precedence over an existing Index page. If for example you have a page class <code>com.example.myapp.pages.Start</code> it will map to <code>/</code>.</p>    <div c
 lass="aui-message problem shadowed information-macro">
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
                             <p>Use of start-pages is discouraged and support for it will eventually be removed. Use an Index page instead.</p>
                     </div>
     </div>
-
-
-<h2 id="ComponentClasses-Pagesvs.Components">Pages vs. Components</h2>
-
-<p>The distinction between pages and component is very, very small. The only real difference is the package name: <em>root</em>.<strong>pages</strong>.<em>PageName</em> for pages, and <em>root</em>.<strong>components</strong>.<em>ComponentType</em> for components. Conceptually, page components are simply the <em>root component</em> of a page's component tree.</p>
-
-<p><em>For Tapestry 4 users: there was a much greater distinction in Tapestry 4 between pages and components, which showed up as separate interfaces and a hierarchy of abstract implementations to extend your classes from.</em></p>
-
-<h2 id="ComponentClasses-ClassTransformation">Class Transformation</h2>
-
-<p>Tapestry uses your class as a starting point. It <em>transforms</em> your class at runtime. This is necessary for a number of reasons, including to address how Tapestry shares pages between requests.</p>
-
-<p>For the most part, these transformations are both sensible and invisible. In a few limited cases, they are marginally <a shape="rect" class="external-link" href="http://www.joelonsoftware.com/printerFriendly/articles/LeakyAbstractions.html" >leaky</a> &#8211; for instance, the scope restrictions on instance variables described below &#8211; but we feel that the programming model in general will support very high levels of developer productivity.</p>
-
-<p>Because transformation doesn't occur until <em>runtime</em>, the build stage of your application is not affected by the fact that you are creating a Tapestry application. Further, your classes are absolutely simple POJOs during unit testing.</p>
-
-<h2 id="ComponentClasses-LiveClassReloading">Live Class Reloading</h2>
-
-<p>Main Article: <a shape="rect" href="class-reloading.html">Class Reloading</a></p>
-
-<p>Component classes are monitored for changes by the framework. <a shape="rect" href="class-reloading.html">Classes are reloaded when changed</a>. This allows you to build your application with a speed approaching that of a scripting environment, without sacrificing any of the power of the Java platform.</p>
-
-<p>And it's fast! You won't even notice that this magic class reloading has occurred.</p>
-
-<p>The net result: super productivity &#8212; change your class, see the change instantly. This is designed to be a blend of the best of scripting environments (such as Python or Ruby) with all the speed and power of Java backing it up.</p>
-
-<p>However, class reloading <em>only</em> applies to component classes and, starting in 5.2, Tapestry IOC-based service implementations (with some restrictions). Other classes, such as service interfaces, entity/model classes, and other data objects, are loaded by the normal class loader and not subject to live class reloading.</p>
-
-<h2 id="ComponentClasses-InstanceVariables">Instance Variables</h2>
-
-<p>Tapestry components may have instance variables (unlike Tapestry 4, where you had to use <em>abstract properties</em>).</p>
-
-<p><strong>Instance variables must be private.</strong>. These scope restrictions are necessary in order for Tapestry to perform runtime class modifications to support instance variables. You may have instance variables with other scopes in your class, but you may then see unexpected behavior in a production application because of how Tapestry shares and reuses pages and components. Tapestry will log an error for each component class that contains instance variables that violate these scope restrictions.</p>
-
-<p>Be aware that you will need to provide getter and setter methods to access your classes' instance variables. Tapestry <em>does not</em> do this automatically unless you provide the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Property.html">Property</a> annotation on the field.</p>
-
-
+<h2 id="ComponentClasses-Pagesvs.Components">Pages vs. Components</h2><p>The distinction between pages and component is very, very small. The only real difference is the package name: <em>root</em>.<strong>pages</strong>.<em>PageName</em> for pages, and <em>root</em>.<strong>components</strong>.<em>ComponentType</em> for components. Conceptually, page components are simply the <em>root component</em> of a page's component tree.</p><p><em>For Tapestry 4 users: there was a much greater distinction in Tapestry 4 between pages and components, which showed up as separate interfaces and a hierarchy of abstract implementations to extend your classes from.</em></p><h2 id="ComponentClasses-ClassTransformation">Class Transformation</h2><p>Tapestry uses your class as a starting point. It <em>transforms</em> your class at runtime. This is necessary for a number of reasons, including to address how Tapestry shares pages between requests.</p><p>For the most part, these transformations are both se
 nsible and invisible. In a few limited cases, they are marginally <a shape="rect" class="external-link" href="http://www.joelonsoftware.com/printerFriendly/articles/LeakyAbstractions.html" >leaky</a> &#8211; for instance, the scope restrictions on instance variables described below &#8211; but we feel that the programming model in general will support very high levels of developer productivity.</p><p>Because transformation doesn't occur until <em>runtime</em>, the build stage of your application is not affected by the fact that you are creating a Tapestry application. Further, your classes are absolutely simple POJOs during unit testing.</p><h2 id="ComponentClasses-LiveClassReloading">Live Class Reloading</h2><p>Main Article: <a shape="rect" href="class-reloading.html">Class Reloading</a></p><p>Component classes are monitored for changes by the framework. <a shape="rect" href="class-reloading.html">Classes are reloaded when changed</a>. This allows you to build your application with
  a speed approaching that of a scripting environment, without sacrificing any of the power of the Java platform.</p><p>And it's fast! You won't even notice that this magic class reloading has occurred.</p><p>The net result: super productivity &#8212; change your class, see the change instantly. This is designed to be a blend of the best of scripting environments (such as Python or Ruby) with all the speed and power of Java backing it up.</p><p>However, class reloading <em>only</em> applies to component classes and, starting in 5.2, Tapestry IOC-based service implementations (with some restrictions). Other classes, such as service interfaces, entity/model classes, and other data objects, are loaded by the normal class loader and not subject to live class reloading.</p><h2 id="ComponentClasses-InstanceVariables">Instance Variables</h2><p>Tapestry components may have instance variables (unlike Tapestry 4, where you had to use <em>abstract properties</em>).</p><p><strong>Instance variab
 les must be private.</strong>. These scope restrictions are necessary in order for Tapestry to perform runtime class modifications to support instance variables. You may have instance variables with other scopes in your class, but you may then see unexpected behavior in a production application because of how Tapestry shares and reuses pages and components. Tapestry will log an error for each component class that contains instance variables that violate these scope restrictions.</p><p>Be aware that you will need to provide getter and setter methods to access your classes' instance variables. Tapestry <em>does not</em> do this automatically unless you provide the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Property.html">Property</a> annotation on the field.</p>
 
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
-
 <p>Since release 5.3.2, instance variables may be protected, or package private (that is, no access modifier). Under specific circumstances they may even be public (public fields must either be final, or have the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Retain.html">Retain</a> annotation).</p>
-</div>
-
-<h2 id="ComponentClasses-TransientInstanceVariables">Transient Instance Variables</h2>
-
-<p>Unless an instance variable is decorated with an annotation, it will be a <em>transient</em> instance variable. This means that its value resets to its default value at the end of reach request (when the <a shape="rect" href="page-life-cycle.html">page is detached from the request</a>).</p>
-
-    <div class="aui-message warning shadowed information-macro">
+</div><h2 id="ComponentClasses-TransientInstanceVariables">Transient Instance Variables</h2><p>Unless an instance variable is decorated with an annotation, it will be a <em>transient</em> instance variable. This means that its value resets to its default value at the end of reach request (when the <a shape="rect" href="page-life-cycle.html">page is detached from the request</a>).</p>    <div class="aui-message warning shadowed information-macro">
                     <p class="title">About initialization</p>
                             <span class="aui-icon icon-warning">Icon</span>
                 <div class="message-content">
-                            
-<p>Never initialize an instance field to a <em>mutable</em> object at the point of declaration.  If this is done, the instance created from that initializer becomes the default value for that field and is reused inside the component on every request.  This could cause state to inadvertently be shared between different sessions in an application.</p>
+                            <p>Never initialize an instance field to a <em>mutable</em> object at the point of declaration. If this is done, the instance created from that initializer becomes the default value for that field and is reused inside the component on every request. This could cause state to inadvertently be shared between different sessions in an application.</p>
                     </div>
     </div>
 
 
-
-
     <div class="aui-message problem shadowed information-macro">
                     <p class="title">Deprecated since 5.2</p>
                             <span class="aui-icon icon-problem">Icon</span>
@@ -301,25 +189,8 @@ public class HelloWorld
 
 <div style="border-right: 20px solid #ffcccc;border-left: 20px solid #ffcccc;">
 <p>For Tapestry 5.1 and earlier, in the rare event that you have a variable that can keep its value between requests and you would like to defeat that reset logic, then you can add a @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Retain.html">Retain</a> annotation to the field. You should take care that no client-specific data is stored into such a field, since on a later request the same page <em>instance</em> may be used for a different user. Likewise, on a later request for the <em>same</em> client, a <em>different</em> page instance may be used.</p>
-</div>
-
-<p>Use <a shape="rect" href="persistent-page-data.html">persistent fields</a> to hold client-specific information from one request to the next.</p>
-
-<p>Further, final fields are (in fact) final, and will not be reset between requests.</p>
-
-<h2 id="ComponentClasses-Constructors">Constructors</h2>
-
-<p>Tapestry will instantiate your class using the default, no arguments constructor. Other constructors will be ignored.</p>
-
-<h2 id="ComponentClasses-Injection">Injection</h2>
-
-<p>Main Article: <a shape="rect" href="injection.html">Injection</a></p>
-
-<p>Injection of dependencies occurs at the field level, via additional annotations. At runtime, fields that contain injections become read-only.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-@Inject // inject a resource
+</div><p>Use <a shape="rect" href="persistent-page-data.html">persistent fields</a> to hold client-specific information from one request to the next.</p><p>Further, final fields are (in fact) final, and will not be reset between requests.</p><h2 id="ComponentClasses-Constructors">Constructors</h2><p>Tapestry will instantiate your class using the default, no arguments constructor. Other constructors will be ignored.</p><h2 id="ComponentClasses-Injection">Injection</h2><p>Main Article: <a shape="rect" href="injection.html">Injection</a></p><p>Injection of dependencies occurs at the field level, via additional annotations. At runtime, fields that contain injections become read-only.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Inject // inject a resource
 private ComponentResources componentResources;
 
 @Inject // inject a block
@@ -332,31 +203,8 @@ private Asset banner;
 @Inject // inject a service
 private AjaxResponseRenderer ajaxResponseRenderer;
 ]]></script>
-</div></div>
-
-<h2 id="ComponentClasses-Parameters">Parameters</h2>
-
-<p>Main Article: <a shape="rect" href="component-parameters.html">Component Parameters</a></p>
-
-<p>Component parameters are private fields of your component class annotated with @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Parameter.html">Parameter</a>. Component parameters represent a two-way binding of a field of your component and a property or resource of its containing component or page.</p>
-
-<h2 id="ComponentClasses-PersistentFields">Persistent Fields</h2>
-
-<p>Main Article: <a shape="rect" href="persistent-page-data.html">Persistent Page Data</a></p>
-
-<p>Most fields in component classes are automatically cleared at the end of each request. However, fields may be annotated so that they retain their value across requests, using the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html">Persist</a> annotation.</p>
-
-<h2 id="ComponentClasses-Embedded_ComponentsEmbeddedComponents"><span class="confluence-anchor-link" id="ComponentClasses-Embedded_Components"></span>Embedded Components</h2>
-
-<p>Components often contain other components. Components inside another component's template are called <em>embedded components</em>. The containing component's <a shape="rect" href="component-templates.html">template</a> will contain special elements, in the Tapestry namespace, identifying where the the embedded components go.</p>
-
-<p>You can define the type of component inside template, or you can create an instance variable for the component and use the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Component.html">Component</a> annotation to define the component type and parameters.</p>
-
-<p>Example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-package org.example.app.pages;
+</div></div><h2 id="ComponentClasses-Parameters">Parameters</h2><p>Main Article: <a shape="rect" href="component-parameters.html">Component Parameters</a></p><p>Component parameters are private fields of your component class annotated with @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Parameter.html">Parameter</a>. Component parameters represent a two-way binding of a field of your component and a property or resource of its containing component or page.</p><h2 id="ComponentClasses-PersistentFields">Persistent Fields</h2><p>Main Article: <a shape="rect" href="persistent-page-data.html">Persistent Page Data</a></p><p>Most fields in component classes are automatically cleared at the end of each request. However, fields may be annotated so that they retain their value across requests, using the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotation
 s/Persist.html">Persist</a> annotation.</p><h2 id="ComponentClasses-Embedded_ComponentsEmbeddedComponents"><span class="confluence-anchor-link" id="ComponentClasses-Embedded_Components"></span>Embedded Components</h2><p>Components often contain other components. Components inside another component's template are called <em>embedded components</em>. The containing component's <a shape="rect" href="component-templates.html">template</a> will contain special elements, in the Tapestry namespace, identifying where the the embedded components go.</p><p>You can define the type of component inside template, or you can create an instance variable for the component and use the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Component.html">Component</a> annotation to define the component type and parameters.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"
 >
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[package org.example.app.pages;
 
 import org.apache.tapestry5.annotations.Component;
 import org.apache.tapestry5.annotations.Property;
@@ -372,19 +220,7 @@ public class Countdown
     private int countValue;
 }
 ]]></script>
-</div></div>
-
-<p>The above defines a component whose embedded id is "count" (this id is derived from the name of the field and an element with that id must be present in the corresponding template, otherwise an error is displayed (see below)). The type of the component is org.example.app.components.Count. The start and end parameters of the Count component are bound to literal values, and the value parameter of the Count component is bound to the countValue property of the Countdown component.</p>
-
-<p>Technically, the start and end parameters should be bound to properties, just the the value parameter. However, certain literal values, such as the numeric literals in the example, are accepted by the <code>prop:</code> binding prefix even though they are not actually properties (this is largely as a convenience to the application developer). We could also use the <code>literal:</code> prefix, <code>"start=literal:5"</code>, which accomplishes largely the same thing.</p>
-
-<p>You may specify additional parameters inside the component template, but parameters in the component class take precedence.</p>
-
-<p><strong>TODO: May want a more complex check; what if user uses prop: in the template and there's a conflict?</strong></p>
-
-<p>You may override the default component id (as derived from the field name) using the id() attribute of the Component annotation.</p>
-
-<p>If you define a component in the component class, and there is no corresponding element in the template, Tapestry will log an error. In the example above that would be the case if the template for the Countdown page didn't contain an element with <code>&lt;t:count t:id="count"&gt;</code>.</p></div>
+</div></div><p>The above defines a component whose embedded id is "count" (this id is derived from the name of the field and an element with that id must be present in the corresponding template, otherwise an error is displayed (see below)). The type of the component is org.example.app.components.Count. The start and end parameters of the Count component are bound to literal values, and the value parameter of the Count component is bound to the countValue property of the Countdown component.</p><p>Technically, the start and end parameters should be bound to properties, just the the value parameter. However, certain literal values, such as the numeric literals in the example, are accepted by the <code>prop:</code> binding prefix even though they are not actually properties (this is largely as a convenience to the application developer). We could also use the <code>literal:</code> prefix, <code>"start=literal:5"</code>, which accomplishes largely the same thing.</p><p>You may specify 
 additional parameters inside the component template, but parameters in the component class take precedence.</p><p><strong>TODO: May want a more complex check; what if user uses prop: in the template and there's a conflict?</strong></p><p>You may override the default component id (as derived from the field name) using the id() attribute of the Component annotation.</p><p>If you define a component in the component class, and there is no corresponding element in the template, Tapestry will log an error. In the example above that would be the case if the template for the Countdown page didn't contain an element with <code>&lt;t:count t:id="count"&gt;</code>.</p></div>
 </div>
 
 <div class="clearer"></div>