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 2014/12/15 16:20:13 UTC
svn commit: r932846 - in /websites/production/tapestry/content:
cache/main.pageCache component-parameters.html cookbook.html
Author: buildbot
Date: Mon Dec 15 15:20:12 2014
New Revision: 932846
Log:
Production update by buildbot for tapestry
Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/component-parameters.html
websites/production/tapestry/content/cookbook.html
Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/tapestry/content/component-parameters.html
==============================================================================
--- websites/production/tapestry/content/component-parameters.html (original)
+++ websites/production/tapestry/content/component-parameters.html Mon Dec 15 15:20:12 2014
@@ -153,14 +153,14 @@
</li></ul>
</div></div>
-<p><strong>Contents</strong></p>
+<h3><a shape="rect" name="ComponentParameters-Contents"></a>Contents</h3>
<style type="text/css">/*<![CDATA[*/
-div.rbtoc1418653179986 {padding: 0px;}
-div.rbtoc1418653179986 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1418653179986 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1418656788408 {padding: 0px;}
+div.rbtoc1418656788408 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1418656788408 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style><div class="toc-macro rbtoc1418653179986">
-<ul class="toc-indentation"><li>Related Articles</li></ul>
+/*]]>*/</style><div class="toc-macro rbtoc1418656788408">
+<ul class="toc-indentation"><li>Related Articles</li><li><a shape="rect" href="#ComponentParameters-Contents">Contents</a></li></ul>
<ul><li><a shape="rect" href="#ComponentParameters-ParameterBindings">Parameter Bindings</a></li><li><a shape="rect" href="#ComponentParameters-BindingExpressions">Binding Expressions</a>
<ul class="toc-indentation"><li><a shape="rect" href="#ComponentParameters-RenderVariables:Bindings">Render Variables: Bindings</a></li><li><a shape="rect" href="#ComponentParameters-Property:Bindings">Property: Bindings</a></li><li><a shape="rect" href="#ComponentParameters-Validate:Bindings">Validate: Bindings</a></li><li><a shape="rect" href="#ComponentParameters-Translate:Bindings">Translate: Bindings</a></li><li><a shape="rect" href="#ComponentParameters-Asset:Bindings">Asset: Bindings</a></li><li><a shape="rect" href="#ComponentParameters-Context:Bindings">Context: Bindings</a></li></ul>
</li><li><a shape="rect" href="#ComponentParameters-@Parameterannotation">@Parameter annotation</a>
@@ -171,7 +171,7 @@ div.rbtoc1418653179986 li {margin-left:
<t:pagelink page="Index">Go Home</t:pagelink>
</html>
]]></script>
-</div></div><p>A component may have any number of parameters. Each parameter has a specific name, a specific Java type (which may be a primitive value), and may be <em>optional</em> or <em>required</em>.</p><p>Within a component class, parameters are declared by using the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Parameter.html">Parameter</a> annotation on a private field.</p><p>In Tapestry, a parameter is not a slot into which data is pushed: it is a <em>connection</em> between a field of the component (marked with the @Parameter annotation) and a property or resource of the component's container. In most simple examples, the component's container is the page, but since components can be nested, often the container of a component is another component.</p><p>The connection between a component and a property (or resource) of its container is called a <em>binding</em>. The binding is two-way: the component
can read the bound property by reading its parameter field. Likewise, a component that updates its parameter field will update the bound property.</p><p>This is important in a lot of cases; for example a TextField component can read <em>and update</em> the property bound to its value parameter. It reads the value when rendering, but updates the value when the form is submitted.</p><p>The component listed below is a looping component; it renders its body a number of times, defined by its <code>start</code> and <code>end</code> parameters (which set the boundaries of the loop). The component can update a <code>result</code> parameter bound to a property of its container; it will automatically count up or down depending on whether <code>start</code> or <code>end</code> is larger.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>A component may have any number of parameters. Each parameter has a specific name, a specific Java type (which may be a primitive value), and may be <em>optional</em> or <em>required</em>.</p><p>Within a component class, parameters are declared by using the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Parameter.html">Parameter</a> annotation on a private field.</p><p><span class="confluence-anchor-link" id="ComponentParameters-bindingparameters"></span></p><h1 id="ComponentParameters-ParameterBindings">Parameter Bindings</h1><p>In Tapestry, a parameter is not a slot into which data is pushed: it is a <em>connection</em> between a field of the component (marked with the @Parameter annotation) and a property or resource of the component's container. (Components can be nested, so the container can be either the page or another component.)</p><p>The connection between a component and a property (o
r resource) of its container is called a <em>binding</em>. The binding is two-way: the component can read the bound property by reading its parameter field. Likewise, a component that updates its parameter field will update the bound property.</p><p>This is important in a lot of cases; for example a TextField component can read <em>and update</em> the property bound to its value parameter. It reads the value when rendering, but updates the value when the form is submitted.</p><p>The component listed below is a looping component; it renders its body a number of times, defined by its <code>start</code> and <code>end</code> parameters (which set the boundaries of the loop). The component can update a <code>result</code> parameter bound to a property of its container; it will automatically count up or down depending on whether <code>start</code> or <code>end</code> is larger.</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.components;
import org.apache.tapestry5.annotations.AfterRender;
@@ -224,7 +224,7 @@ public class Count
}
}
]]></script>
-</div></div><p>The name of the parameter is the same as field name (except with leading "_" and "$" characters, if any, removed). Here, the parameter names are "start", "end" and "result".</p><p><span class="confluence-anchor-link" id="ComponentParameters-bindingparameters"></span></p><h1 id="ComponentParameters-ParameterBindings">Parameter Bindings</h1><p>The component above can be referenced in another component or page <a shape="rect" href="component-templates.html">template</a>, and its parameters <em>bound</em>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The name of the parameter is the same as field name (except with leading "_" and "$" characters, if any, removed). Here, the parameter names are "start", "end" and "result".</p><p>The component above can be referenced in another component or page <a shape="rect" href="component-templates.html">template</a>, and its parameters <em>bound</em>:</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[<html t:type="layout" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
<p> Merry Christmas: <t:count end="3"> Ho! </t:count>
</p>
Modified: websites/production/tapestry/content/cookbook.html
==============================================================================
--- websites/production/tapestry/content/cookbook.html (original)
+++ websites/production/tapestry/content/cookbook.html Mon Dec 15 15:20:12 2014
@@ -56,7 +56,7 @@
</div>
<div id="content">
-<div id="ConfluenceContent"><h1 id="Cookbook-Contents">Contents</h1><p>The Tapestry Cookbook is a collection of mini-tutorials for commonly occurring patterns in Tapestry.</p><p></p><ul class="childpages-macro"><li><a shape="rect" href="default-parameter.html">Default Parameter</a> — <span class="smalltext">Avoiding repetition when using component parameters by adding autoconnect=true</span></li><li><a shape="rect" href="overriding-exception-reporting.html">Overriding Exception Reporting</a> — <span class="smalltext">Customizing Tapestry's default exception reporting page</span></li><li><a shape="rect" href="error-page-recipe.html">Error Page Recipe</a> — <span class="smalltext">Serving up a Tapestry page as your site's custom 404 response page</span></li><li><a shape="rect" href="supporting-informal-parameters.html">Supporting Informal Parameters</a> — <span class="smalltext">How to make your custom component accept and pass on all unknown parameters to the
underlying HTML element</span></li><li><a shape="rect" href="component-libraries.html">Component Libraries</a> — <span class="smalltext">How to create a library of your custom components</span></li><li><a shape="rect" href="switching-cases.html">Switching Cases</a> — <span class="smalltext">Performing the equivalent of a "switch" statement in your component template using blocks and a delegate</span></li><li><a shape="rect" href="enum-parameter-recipe.html">Enum Parameter Recipe</a> — <span class="smalltext">Using an Enum as a component parameter using coercion</span></li><li><a shape="rect" href="extending-the-if-component.html">Extending the If Component</a> — <span class="smalltext">Adding a type coercion to enable the If component to test for anything</span></li><li><a shape="rect" href="meta-programming-page-content.html">Meta-Programming Page Content</a> — <span class="smalltext">Adding an Annotation and a Filter to customize Tapestry's page rende
ring</span></li><li><a shape="rect" href="using-select-with-a-list.html">Using Select With a List</a> — <span class="smalltext">Using SelectModel, SelectModelFactory and ValueEncoder for Select menus populated from a database</span></li><li><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a> — <span class="smalltext">A tutorial for using Tapestry's Inversion of Control container</span><ul class="childpages-macro"><li><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html">IoC Cookbook - Basic Services and Injection</a></li><li><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a></li><li><a shape="rect" href="ioc-cookbook-patterns.html">IoC Cookbook - Patterns</a></li><li><a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a></li></ul></li><li><a shape="rect" href="performance-and-clustering.html">Performance and Clustering</a></li></ul><p> </
p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></div>
+<div id="ConfluenceContent"><p>This is the <strong>Tapestry Cookbook</strong>, a collection of mini-tutorials for commonly occurring patterns in Tapestry.</p><h1 id="Cookbook-Contents">Contents</h1><p></p><ul class="childpages-macro"><li><a shape="rect" href="default-parameter.html">Default Parameter</a> — <span class="smalltext">Avoiding repetition when using component parameters by adding autoconnect=true</span></li><li><a shape="rect" href="overriding-exception-reporting.html">Overriding Exception Reporting</a> — <span class="smalltext">Customizing Tapestry's default exception reporting page</span></li><li><a shape="rect" href="error-page-recipe.html">Error Page Recipe</a> — <span class="smalltext">Serving up a Tapestry page as your site's custom 404 response page</span></li><li><a shape="rect" href="supporting-informal-parameters.html">Supporting Informal Parameters</a> — <span class="smalltext">How to make your custom component accept and pass on all unk
nown parameters to the underlying HTML element</span></li><li><a shape="rect" href="component-libraries.html">Component Libraries</a> — <span class="smalltext">How to create a library of your custom components</span></li><li><a shape="rect" href="switching-cases.html">Switching Cases</a> — <span class="smalltext">Performing the equivalent of a "switch" statement in your component template using blocks and a delegate</span></li><li><a shape="rect" href="enum-parameter-recipe.html">Enum Parameter Recipe</a> — <span class="smalltext">Using an Enum as a component parameter using coercion</span></li><li><a shape="rect" href="extending-the-if-component.html">Extending the If Component</a> — <span class="smalltext">Adding a type coercion to enable the If component to test for anything</span></li><li><a shape="rect" href="meta-programming-page-content.html">Meta-Programming Page Content</a> — <span class="smalltext">Adding an Annotation and a Filter to customiz
e Tapestry's page rendering</span></li><li><a shape="rect" href="using-select-with-a-list.html">Using Select With a List</a> — <span class="smalltext">Using SelectModel, SelectModelFactory and ValueEncoder for Select menus populated from a database</span></li><li><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a> — <span class="smalltext">A tutorial for using Tapestry's Inversion of Control container</span><ul class="childpages-macro"><li><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html">IoC Cookbook - Basic Services and Injection</a></li><li><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a></li><li><a shape="rect" href="ioc-cookbook-patterns.html">IoC Cookbook - Patterns</a></li><li><a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a></li></ul></li><li><a shape="rect" href="performance-and-clustering.html">Performance and Clustering</
a></li></ul><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></div>
</div>
<div class="clearer"></div>