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 2015/07/18 20:20:01 UTC

svn commit: r958842 - in /websites/production/tapestry/content: cache/main.pageCache component-parameters.html

Author: buildbot
Date: Sat Jul 18 18:20:00 2015
New Revision: 958842

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/cache/main.pageCache
    websites/production/tapestry/content/component-parameters.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 Sat Jul 18 18:20:00 2015
@@ -58,21 +58,21 @@
 
 <div id="content">
 <div id="ConfluenceContent"><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><p><strong>Component parameters</strong> are the primary means for a component instance and its container to communicate with each other. Parameters are used to <em>configure</em> component instances.</p><p>In the following example, <code>page</code> is a parameter of the <code>pagelink</code> component. The page parameter tells the pagelink component which page to go to when the user clicks on the rendered hyperlink:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><strong>Component parameters</strong> are the primary means for a component instance and its container to communicate with each other. Parameters are used to <em>configure</em> component instances.<p>In the following example, <code>page</code> is a parameter of the <code>pagelink</code> component. The page parameter tells the pagelink component which page to go to when the user clicks on the rendered hyperlink:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;html xmlns:t=&quot;http://tapestry.apache.org/schema/tapestry_5_3.xsd&quot;&gt;
     &lt;t:pagelink page=&quot;Index&quot;&gt;Go Home&lt;/t:pagelink&gt;
 &lt;/html&gt;]]></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, as we'll see below.</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><div class="navmenu" style="float:r
 ight; background:white; margin:3px; padding:3px">
 <div class="panel" style="border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;"><b>Contents</b></div><div class="panelContent">
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1436951974687 {padding: 0px;}
-div.rbtoc1436951974687 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1436951974687 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1437243592430 {padding: 0px;}
+div.rbtoc1437243592430 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1437243592430 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1436951974687">
+/*]]>*/</style><div class="toc-macro rbtoc1437243592430">
 <ul class="toc-indentation"><li><a shape="rect" href="#ComponentParameters-ParameterBindings">Parameter Bindings</a></li><li><a shape="rect" href="#ComponentParameters-BindingExpressions">Binding Expressions</a></li><li><a shape="rect" href="#ComponentParameters-@Parameterannotation">@Parameter annotation</a></li><li><a shape="rect" href="#ComponentParameters-Don'tusethe${...}syntax!">Don't use the ${...} syntax!</a></li><li><a shape="rect" href="#ComponentParameters-InformalParameters">Informal Parameters</a></li><li><a shape="rect" href="#ComponentParameters-ParametersAreBi-Directional">Parameters Are Bi-Directional</a></li><li><a shape="rect" href="#ComponentParameters-InheritedParameterBindings">Inherited Parameter Bindings</a></li><li><a shape="rect" href="#ComponentParameters-ComputedParameterBindingDefaults">Computed Parameter Binding Defaults</a></li><li><a shape="rect" href="#ComponentParameters-UnboundParameters">Unbound Parameters</a></li><li><a shape="rect" href="#Compon
 entParameters-ParameterTypeCoercion">Parameter Type Coercion</a></li><li><a shape="rect" href="#ComponentParameters-ParameterNames">Parameter Names</a></li><li><a shape="rect" href="#ComponentParameters-DeterminingifBound">Determining if Bound</a></li><li><a shape="rect" href="#ComponentParameters-PublishingParameters">Publishing Parameters</a></li></ul>
 </div>
-</div></div></div><p>&#160;</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></div>&#160;<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" st
 yle="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[package org.example.app.components;
 
 import org.apache.tapestry5.annotations.AfterRender;