You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by bu...@apache.org on 2014/01/18 19:21:06 UTC

svn commit: r894647 [9/9] - in /websites/production/tapestry/content: ./ cache/

Modified: websites/production/tapestry/content/tapestry-for-jsf-users.html
==============================================================================
--- websites/production/tapestry/content/tapestry-for-jsf-users.html (original)
+++ websites/production/tapestry/content/tapestry-for-jsf-users.html Sat Jan 18 18:21:05 2014
@@ -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();
@@ -77,11 +78,7 @@ table.ScrollbarTable td.ScrollbarParent 
 table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
 table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
 
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="component-cheat-sheet.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="cheat-sheets.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="cheat-sheets.html">Cheat Sheets</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;</td></tr></table></div>
-
-<h1 id="TapestryforJSFUsers-TapestryforJSFUsers">Tapestry for JSF Users</h1>
-
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="component-cheat-sheet.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="cheat-sheets.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="cheat-sheets.html">Cheat Sheets</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;</td></tr></table></div><h1 id="TapestryforJSFUsers-TapestryforJSFUsers">Tapestry for JSF Users</h1><div class="navmenu" style="float:right; background:#eee; margin:3px
 ; padding:3px">
 <h3>Related Articles</h3>
 <ul class="content-by-label"><li>
             <div>
@@ -106,7 +103,7 @@ table.ScrollbarTable td.ScrollbarNextIco
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="tapestry-for-jsf-users.html">Tapestry for JSF Users</a>
+                            <a shape="rect" href="tapestry-tutorial.html">Tapestry Tutorial</a>
                     
                 
                             </div>
@@ -115,7 +112,7 @@ table.ScrollbarTable td.ScrollbarNextIco
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="tapestry-tutorial.html">Tapestry Tutorial</a>
+                            <a shape="rect" href="getting-started.html">Getting Started</a>
                     
                 
                             </div>
@@ -124,70 +121,28 @@ table.ScrollbarTable td.ScrollbarNextIco
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="getting-started.html">Getting Started</a>
+                            <a shape="rect" href="tapestry-for-jsf-users.html">Tapestry for JSF Users</a>
                     
                 
                             </div>
         </li></ul>
-</div>
-
-<p>This is a cheat sheet for learning Tapestry, designed for those who already know JavaServer Faces (JSF).</p>
-
-<p>Because both JSF and Tapestry are component oriented frameworks designed to serve mostly the same kinds of problems in similar ways, developers who already know JSF will find it very easy to learn Tapestry. In fact, Facelets, the default view technology in JSF 2.0, was created specifically to give JSF a Tapestry-like templating capability, so Facelets users should feel right at home.</p>
-
-<p>Since almost all modern JSF applications use Facelets as their view technology, we assume the use of Facelets here when discussing JSF features.</p>
-
-<p>JSF is a rich, mature web framework specification, and there are lots of smart people who use it productively. This guide isn't intended as a pro-versus-con comparison or as advocacy of any kind. Instead, it just attempts to make transitions between the two frameworks easier, regardless of the reason for doing so.</p>
-
-<h2 id="TapestryforJSFUsers-Side-by-sideComparison">Side-by-side Comparison</h2>
-
-<p>JSF and Tapestry have a lot of superficial similarities, so the first steps in that transition are all about relating similar concepts, terms and components in your mind:</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Concepts &amp; Terminology </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Java class associated with a page or component </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> "Backing Bean" </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> "<a shape="rect" href="component-classes.html">Component Class</a>" </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Component attributes/parameters </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> "attributes" </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> "<a shape="rect" href="component-parameters.html">parameters</a>" </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Common Attri
 butes/Parameters</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> HTML Attribute used for invisible instrumentation </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> jsfc="someComponentType" </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="component-templates.html">t:type="someComponentType"</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> CSS "class" attribute name </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> styleClass </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> class </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Alternating "zebra" striped rows </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> rowclasses="class1,class2" </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> c
 lass="${cycle:class1,class2}" using <a shape="rect" class="external-link" href="https://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefixCycle">cycle binding prefix</a>, or with CSS: .rowClass:nth-child(even) {background-color: #e8e8e8;} </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Output and Messages </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Escaped HTML from property </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:outputText value="myBean.myValue"/&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${myValue} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Raw HTML from property </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{myBean.myValue} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="r
 ect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/OutputRaw.html">&lt;t:outputRaw value="myValue"/&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Error messages </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:message&gt; and &lt;h:messages&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Error.html">&lt;t:error&gt;</a> and <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Errors.html">&lt;t:errors&gt;</a> (for forms) or <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Alerts.html">&lt;t:alerts&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Ima
 ge display </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:graphicImage&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>use standard &lt;img&gt; tag</em> </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Conditionals and Looping </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Render-time loop </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;ui:repeat&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Loop.html">&lt;t:loop&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Compile-time loop </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;c:forEach&gt; </p></td><td
  colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Loop.html">&lt;t:loop&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Conditional </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;c:if test="#{myBean.myValue}"&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/If.html">&lt;t:if test="myValue"&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Conditional </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;ui:fragment rendered="#{myBean.someCondition}"/&gt;...&lt;/ui:fragment&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/
 apache/tapestry5/corelib/components/If.html">&lt;t:if test="someCondition"&gt;...&lt;/t:if&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Switch </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;c:choose&gt;&lt;c:when ... &gt;&lt;/c:choose&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> See <a shape="rect" href="switching-cases.html">Switching Cases</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Server-side comment </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;ui:remove&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="component-templates.html">&lt;t:remove&gt;</a> </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Links and Buttons </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry </p></th></tr><tr><td colspan="1" rowspan="1" c
 lass="confluenceTd"><p> Navigational link </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:link outcome="nextpage.xhtml"/&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/PageLink.html">&lt;t:pagelink page="nextpage"/&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Event-triggering link, without form submission </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not available</em> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/ActionLink.html">&lt;t:actionLink&gt;</a> or <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/EventLink.html">&lt;t:eventLink&gt;</a> </p><
 /td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Form submission link </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:commandLink&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/LinkSubmit.html">&lt;t:linkSubmit&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Form submission button </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:commandButton&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html">&lt;t:submit&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Link to Javascript file </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:outputScript&gt; </p></td><td
  colspan="1" rowspan="1" class="confluenceTd"><p> <em>&lt;script&gt; or use @Import in component class</em> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Link to CSS file </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:outputStylesheet&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>&lt;style&gt; or use @Import in component class</em> </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Grids, Tables and Trees </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Tabular data in &lt;table&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:datatable&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/
 components/Grid.html">&lt;t:grid&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Table used for layout </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:panelGrid&gt; with &lt;h:panelGroup&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>use standard &lt;table&gt; tag</em> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Hierarchical tree </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>depends on component library</em> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Tree.html">&lt;t:tree&gt;</a> </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Form Tags/Components </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry </p></th></tr><t
 r><td colspan="1" rowspan="1" class="confluenceTd"><p> Form </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:form&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Form.html">&lt;t:form&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Single-line text input field </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:inputText&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/TextField.html">&lt;t:textField&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Password field </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:inputSecret&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p
 > <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/PasswordField.html">&lt;t:passwordfield&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Select menu </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:selectOneMenu&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html">&lt;t:select&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Checkbox </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:selectBooleanCheckbox&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Checkbox.html">&lt;t:checkbox&gt;</a> </p></td></tr><tr><td colsp
 an="1" rowspan="1" class="confluenceTd"><p> Checkbox list </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:selectManyCheckbox&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Checklist.html">&lt;t:checklist&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Radio button list </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:selectOneRadio&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/RadioGroup.html">&lt;t:radioGroup&gt;</a> with <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Radio.html">&lt;t:radio&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p> Multiple select menu </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:selectManyListbox&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not available</em> (but see Palette and Checklist) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Hidden field </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:inputHidden&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Hidden.html">&lt;t:hidden&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> textarea tag </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:inputTextarea&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/compone
 nts/TextArea.html">&lt;t:textArea&gt;</a> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Label tag </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> &lt;h:outputLabel for="..."&gt; </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Label.html">&lt;t:label for="..."&gt;</a> </p></td></tr></tbody></table></div>
-
-
-<p>Some important notes:</p>
-
-<ul><li>With Tapestry, you don't use the ${...} syntax with parameters of components. Just use a bare expression within the quotes. For example: &lt;t:textfield value="myProperty"&gt; instead of &lt;t:textfield value="${myProperty}"&gt;, because in the latter case the expression is converted to a read-only string before the textfield component gets it.</li></ul>
-
-
-<h2 id="TapestryforJSFUsers-HelloWorldComparison">Hello World Comparison</h2>
-
-<p>Faces templates and Tapestry templates are superficially quite similar. </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>JSF template (helloworld.xhtml)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
+</div><p>This isa brief guide for learning Tapestry, designed for those who already know JavaServer Faces (JSF).</p><p>Because both JSF and Tapestry are component oriented frameworks designed to serve mostly the same kinds of problems in similar ways, developers who already know JSF will find it very easy to learn Tapestry. In fact, Facelets, the default view technology in JSF 2.0, was created specifically to give JSF a Tapestry-like templating capability, so Facelets users should feel right at home.</p><p>Since almost all modern JSF applications use Facelets as their view technology, we assume the use of Facelets here when discussing JSF features.</p><p>JSF is a rich, mature web framework specification, and there are lots of smart people who use it productively. This guide isn't intended as a pro-versus-con comparison or as advocacy of any kind. Instead, it just attempts to make transitions between the two frameworks easier, regardless of the reason for doing so.</p><h2 id="Tapestr
 yforJSFUsers-Side-by-sideComparison">Side-by-side Comparison</h2><p>JSF and Tapestry have a lot of superficial similarities, so the first steps in that transition are all about relating similar concepts, terms and components in your mind:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Concepts &amp; Terminology</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JSF</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Java class associated with a page or component</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>"Backing Bean"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>"<a shape="rect" href="component-classes.html">Component Class</a>"</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Component attributes/parameters</p></td><td colspan="1" rowspan="1" class="confluenceTd">
 <p>"attributes"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>"<a shape="rect" href="component-parameters.html">parameters</a>"</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Common Attributes/Parameters</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JSF</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>HTML Attribute used for invisible instrumentation</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>jsfc="someComponentType"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="component-templates.html">t:type="someComponentType"</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>CSS "class" attribute name</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>styleClass</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>class</p></td></tr><tr><td colspan="1" rowspan="1" cla
 ss="confluenceTd"><p>Alternating "zebra" striped rows</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>rowclasses="class1,class2"</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>class="${cycle:class1,class2}" using <a shape="rect" class="external-link" href="https://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefixCycle">cycle binding prefix</a>, or with CSS: .rowClass:nth-child(even) {background-color: #e8e8e8;}</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Output and Messages</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JSF</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Escaped HTML from property</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:outputText value="myBean.myValue"/&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${myValue}</p></td></tr><tr><td colspan="1" rowspan="1" class="confl
 uenceTd"><p>Raw HTML from property</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{myBean.myValue}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/OutputRaw.html">&lt;t:outputRaw value="myValue"/&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Error messages</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:message&gt; and &lt;h:messages&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Error.html">&lt;t:error&gt;</a> and <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Errors.html">&lt;t:errors&gt;</a> (for forms) or <a shape="rect" class="external-link" href="http://tapes
 try.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Alerts.html">&lt;t:alerts&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Image display</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:graphicImage&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>use standard &lt;img&gt; tag</em></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Conditionals and Looping</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JSF</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Render-time loop</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;ui:repeat&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Loop.html">&lt;t:loop&gt;</a></p></td></tr><tr><td
  colspan="1" rowspan="1" class="confluenceTd"><p>Compile-time loop</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;c:forEach&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Loop.html">&lt;t:loop&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Conditional</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;c:if test="#{myBean.myValue}"&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/If.html">&lt;t:if test="myValue"&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Conditional</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;ui:fragment rendered="#{myBean.someCondition}"/&gt;...&lt;/ui:fragment&gt;</p></td>
 <td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/If.html">&lt;t:if test="someCondition"&gt;...&lt;/t:if&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Switch</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;c:choose&gt;&lt;c:when ... &gt;&lt;/c:choose&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>See <a shape="rect" href="switching-cases.html">Switching Cases</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Server-side comment</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;ui:remove&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="component-templates.html">&lt;t:remove&gt;</a></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Links and Buttons</p></th><th colspan="1" rowspan="1" class="confluenceTh
 "><p>JSF</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Navigational link</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:link outcome="nextpage.xhtml"/&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/PageLink.html">&lt;t:pagelink page="nextpage"/&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Event-triggering link, without form submission</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not available</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/ActionLink.html">&lt;t:actionLink&gt;</a> or <a shape="rect" class="external-link" href="http://tapestr
 y.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/EventLink.html">&lt;t:eventLink&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Form submission link</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:commandLink&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/LinkSubmit.html">&lt;t:linkSubmit&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Form submission button</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:commandButton&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html">&lt;t:submit&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Link to Javascript fi
 le</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:outputScript&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>&lt;script&gt; or use @Import in component class</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Link to CSS file</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:outputStylesheet&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>&lt;style&gt; or use @Import in component class</em></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Grids, Tables and Trees</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JSF</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Tabular data in &lt;table&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:datatable&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" 
 href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html">&lt;t:grid&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Table used for layout</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:panelGrid&gt; with &lt;h:panelGroup&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>use standard &lt;table&gt; tag</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Hierarchical tree</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>depends on component library</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Tree.html">&lt;t:tree&gt;</a></p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Form Tags/Components</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JSF</p></th><th colspan="1" r
 owspan="1" class="confluenceTh"><p>Tapestry</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Form</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:form&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Form.html">&lt;t:form&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Single-line text input field</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:inputText&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/TextField.html">&lt;t:textField&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Password field</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:inputSecret&gt;</p></td><td cols
 pan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/PasswordField.html">&lt;t:passwordfield&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Select menu</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:selectOneMenu&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html">&lt;t:select&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Checkbox</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:selectBooleanCheckbox&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Checkbox.html">&lt;t:checkbox&gt;</
 a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Checkbox list</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:selectManyCheckbox&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Checklist.html">&lt;t:checklist&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Radio button list</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:selectOneRadio&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/RadioGroup.html">&lt;t:radioGroup&gt;</a> with <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Radio.html">&lt;t:radio&gt;</a></p></td></tr><tr><td colspan="
 1" rowspan="1" class="confluenceTd"><p>Multiple select menu</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:selectManyListbox&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not available</em> (but see Palette and Checklist)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Hidden field</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:inputHidden&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Hidden.html">&lt;t:hidden&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>textarea tag</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:inputTextarea&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/compone
 nts/TextArea.html">&lt;t:textArea&gt;</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Label tag</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&lt;h:outputLabel for="..."&gt;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Label.html">&lt;t:label for="..."&gt;</a></p></td></tr></tbody></table></div><p>Some important notes:</p><ul><li>With Tapestry, you don't use the ${...} syntax with parameters of components. Just use a bare expression within the quotes. For example: &lt;t:textfield value="myProperty"&gt; instead of &lt;t:textfield value="${myProperty}"&gt;, because in the latter case the expression is converted to a read-only string before the textfield component gets it.</li></ul><h2 id="TapestryforJSFUsers-HelloWorldComparison">Hello World Comparison</h2><p>Faces templates and Tapestry templates are super
 ficially quite similar.</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>JSF template (helloworld.xhtml)</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
         xmlns:h=&quot;http://java.sun.com/jsf/html&quot;&gt;
   &lt;h:body&gt;
     &lt;p&gt;&lt;h:outputText value=&quot;#{helloWorldBean.greeting} /&gt;&lt;/p&gt;
   &lt;/h:body&gt;
 &lt;/html&gt;
 ]]></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>Tapestry template (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>Tapestry template (HelloWorld.tml)</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;html&gt;
   &lt;body&gt;
     &lt;p&gt;${greeting}&lt;/p&gt;
   &lt;/body&gt;
 &lt;/html&gt;
 ]]></script>
-</div></div></div></div></div></div>
-
-<p>Though these are very similar, notice some differences:</p>
-<ul><li>The #{...} syntax in JSF does not encode the underlying string, so you have to use the &lt;h:outputText&gt; tag if your data may contain HTML reserved characters such as &lt;, &gt;, or &amp;. In contrast, the ${...} syntax in Tapestry <strong>does</strong> encode the underlying string.</li><li>In JSF, backing beans are not necessarily related one-to-one with page templates. Often several templates use the same backing bean, and one template may reference multiple backing beans. In Tapestry, they are always related one-to-one, and therefore you don't have to specify which component class your ${...} expressions are referencing.</li></ul>
-
-
-<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>JSF Backing Bean (HelloWorldBean.java)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-@ManagedBean
+</div></div></div></div></div></div><p>Though these are very similar, notice some differences:</p><ul><li>The #{...} syntax in JSF does not encode the underlying string, so you have to use the &lt;h:outputText&gt; tag if your data may contain HTML reserved characters such as &lt;, &gt;, or &amp;. In contrast, the ${...} syntax in Tapestry <strong>does</strong> encode the underlying string.</li><li>In JSF, backing beans are not necessarily related one-to-one with page templates. Often several templates use the same backing bean, and one template may reference multiple backing beans. In Tapestry, they are always related one-to-one, and therefore you don't have to specify which component class your ${...} expressions are referencing.</li></ul><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>J
 SF Backing Bean (HelloWorldBean.java)</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@ManagedBean
 @RequestScoped
 public class HelloWorldBean {
     public String getGreeting() {
@@ -195,71 +150,20 @@ public class HelloWorldBean {
     }
 }
 ]]></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>Tapestry page class (HelloWorld.java)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-public class HelloWorld {
+</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>Tapestry page class (HelloWorld.java)</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class HelloWorld {
     public String getGreeting() {
         return &quot;Hello, World!&quot;;
     }
 }
 ]]></script>
-</div></div></div></div></div></div>
-
-<h2 id="TapestryforJSFUsers-Expressionsintemplates">Expressions in templates</h2>
-
-<p>JSF uses the Unified Expression Language with the #{...} or ${...} syntax for accessing Backing Bean properties. For its part, Tapestry uses the ${...} syntax with a similar but more limited expression language called <a shape="rect" href="property-expressions.html">Property Expressions</a>. Both allow easy access to properties via the usual JavaBean conventions, but with Tapestry you don't have to specify which class the expression starts at (because it always starts at the component class corresponding to the template). Some comparisons:</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><th colspan="1" rowspan="1" class="confluenceTh"><p> JSF Syntax </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Tapestry Syntax </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Property (calls getEmployeeName() or setEmployeeName()) </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{employeeBean.employeeName} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${employeeName} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Boolean property (calls isHourly() or setHourly()) </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{employeeBean.hourly} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${hourly} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Property chain </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
  #{employeeBean.address.street} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${address.street} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Null-safe property chain </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{employeeBean.address.street} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${address?.street} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 5th element in a List </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{employeeBean.employees[5].name} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${employees.get(5).name} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Negation </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{! employeeBean.hourly} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${! hourly} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Arithmetic &amp; relational
  operators </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> +-*/% div mod </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not available</em> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Relational operators </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> == != ne &lt; lt &gt; gt &lt;= le &gt;= ge </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not available</em> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Ternary operator </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{myBean.foo &lt; 0 ? 'bar' : 'baz'} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not available</em> </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Method calling </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> #{myBean.employees.size()} </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${employees.size()} </p></td></tr>
 <tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Iterated Range </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not avaialble</em> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${1..10} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Iterated Range (calculated) </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not avaialble</em> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${1..groupList.size()} </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> List </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not available</em> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${ [ user.name, user.email, user.phone ] } </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> Map </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <em>not available</em> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> ${ { 'id':'4
 039','type':'hourly' } } </p></td></tr></tbody></table></div>
-
-
-<p>Features shown as <em>not available</em> above are absent by design, because (in both Tapestry and JSF) it is considered best to keep complex logic in the component class rather than in the template.</p>
-
-<h2 id="TapestryforJSFUsers-EventHandling&amp;PageNavigation">Event Handling &amp; Page Navigation</h2>
-
-<h3 id="TapestryforJSFUsers-Eventhandling">Event handling</h3>
-
-<p>In JSF, you specify the event via the <code>action</code> parameter (for example, &lt;h:commandButton value="Submit" action="employeeBean.saveChanges"&gt;). For Tapestry, event handler methods are found by method naming conventions (onSomeEvent() or by method annotations (@Event), based on a combination of the "t:id" attribute and event name, and the action name used depends on the component. For example, the "&lt;t:actionlink&gt;" component in Tapestry emits an "action" event when clicked, and you handle that event in your "onAction()" method.</p>
-
-<h2 id="TapestryforJSFUsers-Validation">Validation</h2>
-
-<p>Tapestry applications can use JSR 303 Bean Validation annotations that JSF users should be familiar with:</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[
-public class Employee {
+</div></div></div></div></div></div><h2 id="TapestryforJSFUsers-Expressionsintemplates">Expressions in templates</h2><p>JSF uses the Unified Expression Language with the #{...} or ${...} syntax for accessing Backing Bean properties. For its part, Tapestry uses the ${...} syntax with a similar but more limited expression language called <a shape="rect" href="property-expressions.html">Property Expressions</a>. Both allow easy access to properties via the usual JavaBean conventions, but with Tapestry you don't have to specify which class the expression starts at (because it always starts at the component class corresponding to the template). Some comparisons:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><th colspan="1" rowspan="1" class="confluenceTh"><p>JSF Syntax</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry Syntax</p></th></tr><tr><td colspan="1" rowspan="1" class="conf
 luenceTd"><p>Property (calls getEmployeeName() or setEmployeeName())</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{employeeBean.employeeName}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${employeeName}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Boolean property (calls isHourly() or setHourly())</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{employeeBean.hourly}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${hourly}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Property chain</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{employeeBean.address.street}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${address.street}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Null-safe property chain</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{employeeBean.address.street}</p></td><td colspan="1" rowspan="1" class="confluenc
 eTd"><p>${address?.street}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>5th element in a List</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{employeeBean.employees[5].name}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${employees.get(5).name}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Negation</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{! employeeBean.hourly}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${! hourly}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Arithmetic &amp; relational operators</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>+-*/% div mod</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not available</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Relational operators</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>== != ne &lt; lt &gt; gt &lt;= le &gt;= ge</p></td>
 <td colspan="1" rowspan="1" class="confluenceTd"><p><em>not available</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Ternary operator</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{myBean.foo &lt; 0 ? 'bar' : 'baz'}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not available</em></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Method calling</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>#{myBean.employees.size()}</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${employees.size()}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Iterated Range</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not avaialble</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${1..10}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Iterated Range (calculated)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not avai
 alble</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${1..groupList.size()}</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>List</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not available</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${ [ user.name, user.email, user.phone ] }</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>not available</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>${ { 'id':'4039','type':'hourly' } }</p></td></tr></tbody></table></div><p>Features shown as <em>not available</em> above are absent by design, because (in both Tapestry and JSF) it is considered best to keep complex logic in the component class rather than in the template.</p><h2 id="TapestryforJSFUsers-EventHandling&amp;PageNavigation">Event Handling &amp; Page Navigation</h2><h3 id="TapestryforJSFUsers-Eventhandling">Eve
 nt handling</h3><p>In JSF, you specify the event via the <code>action</code> parameter (for example, &lt;h:commandButton value="Submit" action="employeeBean.saveChanges"&gt;). For Tapestry, event handler methods are found by method naming conventions (onSomeEvent() or by method annotations (@Event), based on a combination of the "t:id" attribute and event name, and the action name used depends on the component. For example, the "&lt;t:actionlink&gt;" component in Tapestry emits an "action" event when clicked, and you handle that event in your "onAction()" method.</p><h2 id="TapestryforJSFUsers-Validation">Validation</h2><p>Tapestry applications can use JSR 303 Bean Validation annotations that JSF users should be familiar with:</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[public class Employee {
     @Validate(&quot;required,minlength=2,maxlength=100&quot;)
     private String lastName;
     @NotNull @Email private String email;
 ]]></script>
-</div></div>
-
-<h3 id="TapestryforJSFUsers-Post-Redirect-GetNavigation">Post-Redirect-Get Navigation</h3>
-
-<p>By default, most JSF URLs are "one page behind". That is, when you click on an &lt;h:commandLink&gt; link or submit a form, the request goes back to the originating page, and the server returns the contents of the <strong>next</strong> page &#8211; but the URL in the browser shows the previous page's URL. To fix this in JSF you add the "?faces-redirect=true" to the URL you return from event handlers, which causes JSF to send a redirect to the browser to navigate to the next page.</p>
-
-<p>By contrast, Tapestry implements this Post-Redirect-Get pattern by default. The URL will always reflect the page you're seeing, not the page you just came from.</p>
-
-<p>Note that by default Tapestry does not save property values across the Post-Redirect-Get cycle. This means that you have to consider how (and whether) to persist property values from one page to the next.  The usual solution is to either make the values part of the page's <a shape="rect" href="navigation.html#Navigation-PageActivation">Activation Context</a> (which means the values will be appended to the URL) or <a shape="rect" href="persistent-page-data.html">@Persist the properties</a> the values in the session.</p>
-
-<h2 id="TapestryforJSFUsers-CustomandCompositeComponents">Custom and Composite Components</h2>
-
-<p>With JSF, creating custom components is an <a shape="rect" class="external-link" href="http://jsfcorner.blogspot.com/2011/01/custom-components.html" >advanced topic</a>. In fact, many JSF developers have <em>never</em> created a custom component. In JSF 1.x, creating each custom component requires a lot of work: creating 3 Java classes (component, component renderer and component tag), registering the component in an XML file, and registering the tag in the .tld file. In JSF 2.x <em>composite components</em> can be created without too much work (if your needs can be met by combining existing components <em>and</em> you don't need any custom Java), but you still have to use cumbersome &lt;composite:interface&gt; and &lt;composite:implementation&gt; tags in your component templates, and you have to list the composite components in the xml namespace declaration at the top of the pages where you are using them.</p>
-
-<p>Creating true custom components in JSF 2.0 still requires several steps: create a component class (generally having the @FacesComponent annotation and extending UIComponentBase), create a renderer class (generally extending Renderer), add a &lt;renderer&gt; section to the facesconfig file, and create a *-taglib.xml file in the WEB_INF folder that defines the namespace, tag and component type of the custom component.</p>
-
-<p>In contrast, with Tapestry, <a shape="rect" href="component-classes.html">creating custom components</a> is a <em>beginner</em> topic: it is expected to be a daily activity for developers, because it is so easy. In fact, the steps are the same as creating a page. All you have to do is create a (potentially empty) Java class in a "components" sub-package, and create a template file containing (X)HTML markup in the corresponding "components" sub-folder within your package hierarchy under /src/main/resources. You <em>use</em> a custom component just like you use any built-in Tapestry component: <code>&lt;t:mycomponent&gt;</code>.</p>
-
-<p>Because they're so easy to create, Tapestry applications tend to have a lot of custom components and much less repetition of HTML than most JSF applications.</p>
-
-<h2 id="TapestryforJSFUsers-OtherReferences">Other References</h2>
-
-<ul><li><a shape="rect" class="external-link" href="http://blog.tapestry5.de/wp-content/uploads/2010/06/JSF-2.0-vs-Tapestry-5.pdf" >JavaServer Faces 2.0 vs. Tapestry 5: A Head-to-Head Comparison</a> slides by Igor Drobiazko, June 2010.</li><li><a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/6/tutorial/doc/gkhxa.html" >Composite Components: Advanced Topics and Example</a> part of <em>The Java EE 6 Tutorial</em> from Oracle</li></ul>
-
-
-<style type="text/css">/*<![CDATA[*/
+</div></div><h3 id="TapestryforJSFUsers-Post-Redirect-GetNavigation">Post-Redirect-Get Navigation</h3><p>By default, most JSF URLs are "one page behind". That is, when you click on an &lt;h:commandLink&gt; link or submit a form, the request goes back to the originating page, and the server returns the contents of the <strong>next</strong> page &#8211; but the URL in the browser shows the previous page's URL. To fix this in JSF you add the "?faces-redirect=true" to the URL you return from event handlers, which causes JSF to send a redirect to the browser to navigate to the next page.</p><p>By contrast, Tapestry implements this Post-Redirect-Get pattern by default. The URL will always reflect the page you're seeing, not the page you just came from.</p><p>Note that by default Tapestry does not save property values across the Post-Redirect-Get cycle. This means that you have to consider how (and whether) to persist property values from one page to the next. The usual solution is to eith
 er make the values part of the page's <a shape="rect" href="navigation.html#Navigation-PageActivation">Activation Context</a> (which means the values will be appended to the URL) or <a shape="rect" href="persistent-page-data.html">@Persist the properties</a> the values in the session.</p><h2 id="TapestryforJSFUsers-CustomandCompositeComponents">Custom and Composite Components</h2><p>With JSF, creating custom components is an <a shape="rect" class="external-link" href="http://jsfcorner.blogspot.com/2011/01/custom-components.html" >advanced topic</a>. In fact, many JSF developers have <em>never</em> created a custom component. In JSF 1.x, creating each custom component requires a lot of work: creating 3 Java classes (component, component renderer and component tag), registering the component in an XML file, and registering the tag in the .tld file. In JSF 2.x <em>composite components</em> can be created without too much work (if your needs can be met by combining existing components <
 em>and</em> you don't need any custom Java), but you still have to use cumbersome &lt;composite:interface&gt; and &lt;composite:implementation&gt; tags in your component templates, and you have to list the composite components in the xml namespace declaration at the top of the pages where you are using them.</p><p>Creating true custom components in JSF 2.0 still requires several steps: create a component class (generally having the @FacesComponent annotation and extending UIComponentBase), create a renderer class (generally extending Renderer), add a &lt;renderer&gt; section to the facesconfig file, and create a *-taglib.xml file in the WEB_INF folder that defines the namespace, tag and component type of the custom component.</p><p>In contrast, with Tapestry, <a shape="rect" href="component-classes.html">creating custom components</a> is a <em>beginner</em> topic: it is expected to be a daily activity for developers, because it is so easy. In fact, the steps are the same as creating
  a page. All you have to do is create a (potentially empty) Java class in a "components" sub-package, and create a template file containing (X)HTML markup in the corresponding "components" sub-folder within your package hierarchy under /src/main/resources. You <em>use</em> a custom component just like you use any built-in Tapestry component: <code>&lt;t:mycomponent&gt;</code>.</p><p>Because they're so easy to create, Tapestry applications tend to have a lot of custom components and much less repetition of HTML than most JSF applications.</p><h2 id="TapestryforJSFUsers-OtherReferences">Other References</h2><ul><li><a shape="rect" class="external-link" href="http://blog.tapestry5.de/wp-content/uploads/2010/06/JSF-2.0-vs-Tapestry-5.pdf" >JavaServer Faces 2.0 vs. Tapestry 5: A Head-to-Head Comparison</a> slides by Igor Drobiazko, June 2010.</li><li><a shape="rect" class="external-link" href="http://docs.oracle.com/javaee/6/tutorial/doc/gkhxa.html" >Composite Components: Advanced Topics 
 and Example</a> part of <em>The Java EE 6 Tutorial</em> from Oracle</li></ul><style type="text/css">/*<![CDATA[*/
 table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
 table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
 table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}

Modified: websites/production/tapestry/content/type-coercion.html
==============================================================================
--- websites/production/tapestry/content/type-coercion.html (original)
+++ websites/production/tapestry/content/type-coercion.html Sat Jan 18 18:21:05 2014
@@ -69,7 +69,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><h1 id="TypeCoercion-ParameterTypeCoercions">Parameter Type Coercions</h1><div class="navmenu" style="float:right; background:white; margin:3px; padding:3px">
+<div id="ConfluenceContent"><p><strong style="text-align: justify;">Type Coercion</strong><span style="color: rgb(0,0,0);">&#160;is the conversion of one type of object to a new object of a different type with similar content. Tapestry frequently must coerce objects from one type to another. A common example is the coercion of a string into an integer or a double.</span></p><p>See&#160;<a shape="rect" href="typecoercer-service.html">Type Coercer Service</a> for the list of build-in coercions.</p><h2 id="TypeCoercion-ParameterTypeCoercions">Parameter Type Coercions</h2><div class="navmenu" style="float:right; background:white; margin:3px; padding:3px">
 <div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px"></div>
 <h3>Related Articles</h3>
 <ul class="content-by-label"><li>
@@ -86,7 +86,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="default-parameter.html">Default Parameter</a>
+                            <a shape="rect" href="supporting-informal-parameters.html">Supporting Informal Parameters</a>
                     
                 
                             </div>
@@ -95,7 +95,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="supporting-informal-parameters.html">Supporting Informal Parameters</a>
+                            <a shape="rect" href="enum-parameter-recipe.html">Enum Parameter Recipe</a>
                     
                 
                             </div>
@@ -104,7 +104,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="enum-parameter-recipe.html">Enum Parameter Recipe</a>
+                            <a shape="rect" href="component-parameters.html">Component Parameters</a>
                     
                 
                             </div>
@@ -113,7 +113,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="component-parameters.html">Component Parameters</a>
+                            <a shape="rect" href="type-coercion.html">Type Coercion</a>
                     
                 
                             </div>
@@ -122,7 +122,7 @@
                     <span class="icon icon-page" title="Page">Page:</span>            </div>
 
             <div class="details">
-                            <a shape="rect" href="type-coercion.html">Type Coercion</a>
+                            <a shape="rect" href="default-parameter.html">Default Parameter</a>
                     
                 
                             </div>
@@ -144,7 +144,7 @@
 </div></div><p>Here, the type of all three parameters is <code>int</code>.</p><p>However, it is likely that the component will be used as so:</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[  Merry Christmas: &lt;t:count end=&quot;3&quot;&gt; Ho! &lt;/t:count&gt;
 ]]></script>
-</div></div><p>A bare whole number is interpreted by the prop binding prefix as a <code>long</code>. So this is the <em>long</em> value 3.</p><p>Tapestry will automatically coerce the bound value, a <code>long</code>, to the parameter's type, <code>int</code>. This may be a lossy coercion (if the <code>long</code> represents a number larger than can be stored in an <code>int</code>).</p><h1 id="TypeCoercion-TypeCoercerService">TypeCoercer Service</h1><p>Main Article: <a shape="rect" href="typecoercer-service.html">TypeCoercer Service</a></p><p>The TypeCoercer service is responsible for this type coercion. This service is part of the <a shape="rect" href="ioc.html">tapestry-ioc</a> module. The service is quite extensible, allowing for new types and coercions to be added easily. The TapestryModule contributes a few additional coercions into the TypeCoercer service.</p></div>
+</div></div><p>A bare whole number is interpreted by the prop binding prefix as a <code>long</code>. So this is the <em>long</em> value 3.</p><p>Tapestry will automatically coerce the bound value, a <code>long</code>, to the parameter's type, <code>int</code>. This may be a lossy coercion (if the <code>long</code> represents a number larger than can be stored in an <code>int</code>).</p><h2 id="TypeCoercion-TypeCoercerService">TypeCoercer Service</h2><p>Main Article: <a shape="rect" href="typecoercer-service.html">TypeCoercer Service</a></p><p>The TypeCoercer service is responsible for this type coercion. This service is part of the <a shape="rect" href="ioc.html">tapestry-ioc</a> module. The service is quite extensible, allowing for new types and coercions to be added easily. The TapestryModule contributes a few additional coercions into the TypeCoercer service.</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/uploading-files.html
==============================================================================
--- websites/production/tapestry/content/uploading-files.html (original)
+++ websites/production/tapestry/content/uploading-files.html Sat Jan 18 18:21:05 2014
@@ -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,47 +70,22 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><p>Tapestry provides a file upload component based on <a shape="rect" class="external-link" href="http://commons.apache.org/fileupload/">Apache Commons FileUpload</a> to make it easier to handle files uploaded through web forms (via the standard &lt;input type="file"&gt; HTML element).</p>
-
-<h1 id="UploadingFiles-Downloading">Downloading</h1>
-
-<p><strong>tapestry-upload</strong> is not automatically included in Tapestry applications because of the additional dependencies it requires. To include it, just add the <code>tapestry-upload</code> dependency to the pom of your application, something like this:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+<div id="ConfluenceContent"><p>Tapestry provides a file upload component based on <a shape="rect" class="external-link" href="http://commons.apache.org/fileupload/">Apache Commons FileUpload</a> to make it easier to handle files uploaded through web forms (via the standard &lt;input type="file"&gt; HTML element).</p><h1 id="UploadingFiles-Downloading">Downloading</h1><p><strong>tapestry-upload</strong> is not automatically included in Tapestry applications because of the additional dependencies it requires. To include it, just add the <code>tapestry-upload</code> dependency to the pom of your application, something like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
     &lt;artifactId&gt;tapestry-upload&lt;/artifactId&gt;
     &lt;version&gt;${tapestry-release-version}&lt;/version&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-<p>If you aren't using Maven, you'll have to download the jar and its dependencies yourself.</p>
-
-<h1 id="UploadingFiles-Usage">Usage</h1>
-
-<p>The upload component supports default value binding (based on id) and validation.</p>
-
-<h2 id="UploadingFiles-ComponentTemplate">Component Template</h2>
-
-<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[
-    &lt;t:form&gt;
+</div></div><p>If you aren't using Maven, you'll have to download the jar and its dependencies yourself.</p><h1 id="UploadingFiles-Usage">Usage</h1><p>The upload component supports default value binding (based on id) and validation.</p><h2 id="UploadingFiles-ComponentTemplate">Component Template</h2><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[    &lt;t:form&gt;
         &lt;t:errors/&gt;
         &lt;input t:type=&quot;upload&quot; t:id=&quot;file&quot; t:value=&quot;file&quot; validate=&quot;required&quot;/&gt;
         &lt;br/&gt;
         &lt;input type=&quot;submit&quot; value=&quot;Upload&quot;/&gt;
     &lt;/t:form&gt;]]></script>
-</div></div>
-
-<p>Here, because the value parameter was not bound, the component used the file property of its container (because the component's id is 'file'). If you want to upload as a different property, either bind the value parameter or change the component's id.</p>
-
-<h2 id="UploadingFiles-Pageclass">Page class</h2>
-
-<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[
-    public class UploadExample
+</div></div><p>Here, because the value parameter was not bound, the component used the file property of its container (because the component's id is 'file'). If you want to upload as a different property, either bind the value parameter or change the component's id.</p><h2 id="UploadingFiles-Pageclass">Page class</h2><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[    public class UploadExample
     {
         @Property
         private UploadedFile file;
@@ -121,20 +97,8 @@
             file.write(copied);
         }
     }]]></script>
-</div></div>
-
-<h1 id="UploadingFiles-UploadExceptions">Upload Exceptions</h1>
-
-<p>In some cases, file uploads may fail. This can be because of a simple communication exception, or more likely, because the configured maximum upload size was exceeded.</p>
-
-<p>When a file upload exception occurs, Tapestry will trigger a "uploadException" event on the page to notify it of the error. All other normal processing is skipped (no "activate" event, no form submission, etc.).</p>
-
-<p>The event handler should return a non-null object, which will be handled as a navigational result. 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[
-
-   @Persist(PersistenceConstants.FLASH)
+</div></div><h1 id="UploadingFiles-UploadExceptions">Upload Exceptions</h1><p>In some cases, file uploads may fail. This can be because of a simple communication exception, or more likely, because the configured maximum upload size was exceeded.</p><p>When a file upload exception occurs, Tapestry will trigger a "uploadException" event on the page to notify it of the error. All other normal processing is skipped (no "activate" event, no form submission, etc.).</p><p>The event handler should return a non-null object, which will be handled as a navigational result. 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[   @Persist(PersistenceConstants.FLASH)
     @Property
     private String message;
 
@@ -145,24 +109,7 @@
 
         return this;
     }]]></script>
-</div></div>
-
-<p>Note the importance of <code>return this;</code>. A void event handler method, or one that returns null, will result in the FileUploadException being reported to the user as an uncaught runtime exception.</p>
-
-<h1 id="UploadingFiles-Configuration">Configuration</h1>
-
-<p>Four values may be configured as <a shape="rect" href="symbols.html">symbols</a>:</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> upload.repository-location </p></th><td colspan="1" rowspan="1" class="confluenceTd"><p> The directory to which files that are too large to keep in memory will be written to. The default is from the java.io.tmpdir system property. </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> upload.repository-threshold </p></th><td colspan="1" rowspan="1" class="confluenceTd"><p> Upload size, in bytes, at which point the uploaded file is written to disk rather than kept in memory. The default is 10 kilobytes. </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> upload.requestsize-max </p></th><td colspan="1" rowspan="1" class="confluenceTd"><p> Maximim size, in bytes, for the overall request. If exceeded, a FileUploadException will occur. The default is no maximum. </p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> uplo
 ad.filesize-max </p></th><td colspan="1" rowspan="1" class="confluenceTd"><p> Maximum size, in bytes, for any individual uploaded file. Again, a FileUploadException will occur if exceeded. The default is no maximum.</p></td></tr></tbody></table></div>
-
-
-<p>The class <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/upload/services/UploadSymbols.html">UploadSymbols</a> defines constants for all four of these.</p>
-
-<h1 id="UploadingFiles-PotentialIssues">Potential Issues</h1>
-
-<p>The Commons FileUpload library uses the CommonsIO file cleaner service to remove temporary files when they are no longer needed. This service creates a thread to carry out its work. If the commons-io library is shared amongst multiple applications (e.g. added to server classpath) it is possible for an application to terminate this thread prematurely and cause errors for the other applications. (see the <a shape="rect" class="external-link" href="http://jakarta.apache.org/commons/fileupload/using.html">Resource Cleanup</a> section in for more discussion)</p>
-
-<p>Technically the file cleanup service is not needed by Tapestry Upload (which deletes temporary files at the end of request processing). However it is currently not possible to disable it (enhancement request has been filed as <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/FILEUPLOAD-133">FILEUPLOAD-133</a>).</p></div>
+</div></div><p>Note the importance of <code>return this;</code>. A void event handler method, or one that returns null, will result in the FileUploadException being reported to the user as an uncaught runtime exception.</p><h1 id="UploadingFiles-Configuration">Configuration</h1><p>Four values may be configured as <a shape="rect" href="symbols.html">symbols</a>:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.repository-location</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>The directory to which files that are too large to keep in memory will be written to. The default is from the java.io.tmpdir system property.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.repository-threshold</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Upload size, in bytes, at which point the uploaded file is written to disk rather than kept in memory. The default is 10 kilob
 ytes.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.requestsize-max</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximim size, in bytes, for the overall request. If exceeded, a FileUploadException will occur. The default is no maximum.</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>upload.filesize-max</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximum size, in bytes, for any individual uploaded file. Again, a FileUploadException will occur if exceeded. The default is no maximum.</p></td></tr></tbody></table></div><p>The class <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/upload/services/UploadSymbols.html">UploadSymbols</a> defines constants for all four of these.</p><h1 id="UploadingFiles-PotentialIssues">Potential Issues</h1><p>The Commons FileUpload library uses the CommonsIO file cleaner service to remove temporary files when they are 
 no longer needed. This service creates a thread to carry out its work. If the commons-io library is shared amongst multiple applications (e.g. added to server classpath) it is possible for an application to terminate this thread prematurely and cause errors for the other applications. (see the <a shape="rect" class="external-link" href="http://jakarta.apache.org/commons/fileupload/using.html">Resource Cleanup</a> section in for more discussion)</p><p>Technically the file cleanup service is not needed by Tapestry Upload (which deletes temporary files at the end of request processing). However it is currently not possible to disable it (enhancement request has been filed as <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/FILEUPLOAD-133">FILEUPLOAD-133</a>).</p></div>
 </div>
 
 <div class="clearer"></div>