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/27 01:19:57 UTC

svn commit: r959694 [1/5] - in /websites/production/tapestry/content: ./ cache/

Author: buildbot
Date: Sun Jul 26 23:19:56 2015
New Revision: 959694

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/ajax-and-zones.html
    websites/production/tapestry/content/aliases.html
    websites/production/tapestry/content/application-module-class-cheat-sheet.html
    websites/production/tapestry/content/bean-validation.html
    websites/production/tapestry/content/cache/main.pageCache
    websites/production/tapestry/content/client-side-javascript.html
    websites/production/tapestry/content/coffeescript.html
    websites/production/tapestry/content/component-cheat-sheet.html
    websites/production/tapestry/content/component-libraries.html
    websites/production/tapestry/content/confluence-site-setup.html
    websites/production/tapestry/content/default-parameter.html
    websites/production/tapestry/content/developer-bible.html
    websites/production/tapestry/content/error-page-recipe.html
    websites/production/tapestry/content/ioc-cookbook-patterns.html
    websites/production/tapestry/content/ioc-cookbook.html
    websites/production/tapestry/content/javascript-modules.html
    websites/production/tapestry/content/legacy-javascript.html
    websites/production/tapestry/content/operation-tracker.html
    websites/production/tapestry/content/overriding-exception-reporting.html
    websites/production/tapestry/content/performance-and-clustering.html
    websites/production/tapestry/content/release-process.html
    websites/production/tapestry/content/security-faq.html
    websites/production/tapestry/content/specific-errors-faq.html
    websites/production/tapestry/content/supporting-informal-parameters.html
    websites/production/tapestry/content/tapestry-for-jsf-users.html
    websites/production/tapestry/content/tapestry-inversion-of-control-faq.html

Modified: websites/production/tapestry/content/ajax-and-zones.html
==============================================================================
--- websites/production/tapestry/content/ajax-and-zones.html (original)
+++ websites/production/tapestry/content/ajax-and-zones.html Sun Jul 26 23:19:56 2015
@@ -68,17 +68,109 @@
   </div>
 
 <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>Tapestry provides easy-to-use support for <strong>Ajax</strong>, the technique of using JavaScript to dynamically updating parts of a web page with content from the server without redrawing the whole page. With Tapestry, you can do simple Ajax updates without having to write any JavaScript code at all.</p><p>Ajax support is included in many <a shape="rect" href="component-reference.html">built-in components</a> and <a shape="rect" href="component-mixins.html">component mixins</a> via the <code>zone</code> parameter.</p><h2 id="AjaxandZones-Zones">Zones</h2><p>Zones are Tapestry's approach to performing partial page updates. A <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Zone.html">Zone component</a> renders a
 s an HTML element, typically a &lt;div&gt;.</p><p>A zone is recognizable in the DOM because it will have the attribute&#160;<code>data-container-type=zone</code>. The client-side support for Zones is keyed off of this attribute and value.</p><p><span style="line-height: 1.4285715;">A Zone can be updated via an EventLink, ActionLink or Select component, or by a Form. All of these components support a zone parameter, which provides the id of the Zone's &lt;div&gt;. Clicking such a link will invoke an event handler method on the server as normal ... except that the return value of the event handler method is used to send a </span><em style="line-height: 1.4285715;">partial page response</em><span style="line-height: 1.4285715;"> to the client, and the content of that response is used to update the Zone's &lt;div&gt; in place.</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div id="ConfluenceContent"><p>Tapestry provides easy-to-use support for <strong>Ajax</strong>, the technique of using JavaScript to dynamically updating parts of a web page with content from the server without redrawing the whole page. With Tapestry, you can do simple Ajax updates without having to write any JavaScript code at all.</p><div class="aui-label" style="float:right" title="Related Articles">
+
+
+
+
+
+
+
+
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="ajax-and-zones.html">Ajax and Zones</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="legacy-javascript.html">Legacy JavaScript</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="coffeescript.html">CoffeeScript</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="client-side-javascript.html">Client-Side JavaScript</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="javascript-modules.html">JavaScript Modules</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="javascript-faq.html">JavaScript FAQ</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="ajax-components-faq.html">Ajax Components FAQ</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="assets.html">Assets</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>Ajax support is included in many <a shape="rect" href="component-reference.html">built-in components</a> and <a shape="rect" href="component-mixins.html">component mixins</a> via the <code>zone</code> parameter.</p><h2 id="AjaxandZones-Zones">Zones</h2><p>Zones are Tapestry's approach to performing partial page updates. A <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Zone.html">Zone component</a> renders as an HTML element, typically a &lt;div&gt;.</p><p>A zone is recognizable in the DOM because it will have the attribute&#160;<code>data-container-type=zone</code>. The client-side support for Zones is keyed off of this attribute and value.</p><p><span style="line-height: 1.4285715;">A Zone can be updated via an EventLink, ActionLink or Select component, or by a Form. All of these components support a zone parameter, which provides the id of the Zone's &lt;div&gt;. Clicking such a link will invo
 ke an event handler method on the server as normal ... except that the return value of the event handler method is used to send a </span><em style="line-height: 1.4285715;">partial page response</em><span style="line-height: 1.4285715;"> to the client, and the content of that response is used to update the Zone's &lt;div&gt; in place.</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;t:actionlink t:id="someLink" zone="myzone"&gt;update&lt;/t:actionlink&gt;
 ...
 &lt;t:zone t:id="myZone" id="myzone"&gt;
     The current time is ${currentTime}
 &lt;/t:zone&gt;
 </pre>
-</div></div><h3 id="AjaxandZones-EventHandlerReturnTypes">Event Handler Return Types</h3><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:0 1em">
+</div></div><h3 id="AjaxandZones-EventHandlerReturnTypes">Event Handler Return Types</h3><p></p><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:0 1em">
 <p>    <strong>JumpStart Demo:</strong><br clear="none">
-    <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/actionlink" >AJAX ActionLink</a></p></div><p>In a traditional request, the return value of an event handler method is used to determine which page will render a <em>complete</em> response, and a <em>redirect</em> is sent to the client to render the new page (as a new request).</p><p>In contrast, with a Zone update, the return value is used to render a <em>partial response</em> within the <em>same request</em>.</p><p>This return value is often just the zone's own body (as below), but it can also be an injected component or block. The value will be rendered, and that markup will be used on the client side to update the Zone's &lt;div&gt;.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+    <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/actionlink" >AJAX ActionLink</a></p></div>In a traditional request, the return value of an event handler method is used to determine which page will render a <em>complete</em> response, and a <em>redirect</em> is sent to the client to render the new page (as a new request).<p>In contrast, with a Zone update, the return value is used to render a <em>partial response</em> within the <em>same request</em>.</p><p>This return value is often just the zone's own body (as below), but it can also be an injected component or block. The value will be rendered, and that markup will be used on the client side to update the Zone's &lt;div&gt;.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Inject
 private Request request;
 
@@ -103,9 +195,9 @@ Object onClickFromSomeLink()
     return request.isXHR() ? myZone.getBody() : null;
 } 
 </pre>
-</div></div><h3 id="AjaxandZones-MultipleZoneUpdates">Multiple Zone Updates</h3><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:0 1em">
+</div></div><h3 id="AjaxandZones-MultipleZoneUpdates">Multiple Zone Updates</h3><p></p><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:0 1em">
 <p>    <strong>JumpStart Demo:</strong><br clear="none">
-    <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/multiplezoneupdate" >AJAX Multiple Zone Update</a></p></div><p>An event handler often needs to update multiple zones on the client side. To accomplish this, use an <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ajax/AjaxResponseRenderer.html">AjaxResponseRenderer</a>, indicating the zones to update. You must know the client-side id for each zone to update (the best way for this is to lock down the zone's id using the id parameter of the Zone component).</p><p><em>AjaxResponseRenderer was introduced in Tapestry 5.3. For Tapestry 5.2 and earlier, return a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ajax/MultiZoneUpdate.html">MultiZoneUpdate</a> object instead.</em></p><p>The renderer for each zone can be the zone itself, a block, a component, a
  <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Renderable.html">Renderable</a> or a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/runtime/RenderCommand.html">RenderCommand</a> ... or an object, such as String, that can be coerced to either of these.</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>For Tapestry 5.3 and later</b></div><div class="codeContent panelContent pdl">
+    <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/multiplezoneupdate" >AJAX Multiple Zone Update</a></p></div>An event handler often needs to update multiple zones on the client side. To accomplish this, use an <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ajax/AjaxResponseRenderer.html">AjaxResponseRenderer</a>, indicating the zones to update. You must know the client-side id for each zone to update (the best way for this is to lock down the zone's id using the id parameter of the Zone component).<p><em>AjaxResponseRenderer was introduced in Tapestry 5.3. For Tapestry 5.2 and earlier, return a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ajax/MultiZoneUpdate.html">MultiZoneUpdate</a> object instead.</em></p><p>The renderer for each zone can be the zone itself, a block, a component, a <a sha
 pe="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Renderable.html">Renderable</a> or a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/runtime/RenderCommand.html">RenderCommand</a> ... or an object, such as String, that can be coerced to either of these.</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>For Tapestry 5.3 and later</b></div><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@InjectComponent
 private Zone userInput;
 
@@ -156,9 +248,9 @@ Object onActionFromRegister()
 </div></div><p>You may also define and use your own JavaScript effect function (with lower-case names), like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: js; gutter: false; theme: Default" style="font-size:12px;">Tapestry.ElementEffect.myeffectname = function(element){ YourJavascriptCodeGoesHere; };
 </pre>
-</div></div><h3 id="AjaxandZones-ZoneLimitations">Zone Limitations</h3><p>Unlike many other situations, Tapestry relies on you to specify useful and unique ids to Zone components, then reference those ids inside EventLink (or ActionLink, or Form) components. Using Zone components inside any kind of loop may cause additional problems, as Tapestry will <em>uniqueify</em> the client id you specify (appending an index number).</p><p>The show and update function names are converted to lower case; all the methods of Tapestry.ElementEffect should have all lower-case names. Because client-side JavaScript is so fluid (new methods may be added to existing objects), Tapestry makes no attempt to validate the function names ... however, if the names are not valid, then the default show and highlight methods will be used.</p><h3 id="AjaxandZones-MoreInformation">More Information</h3><p>For examples of extending a Form with a Zone and updating multiple zones at once, see the <a shape="rect" href="
 ajax-components-faq.html">Ajax Components FAQ</a>.</p><p><span class="confluence-anchor-link" id="AjaxandZones-autocomplete"></span></p><h2 id="AjaxandZones-AutocompleteMixin">Autocomplete Mixin</h2><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:0 1em">
+</div></div><h3 id="AjaxandZones-ZoneLimitations">Zone Limitations</h3><p>Unlike many other situations, Tapestry relies on you to specify useful and unique ids to Zone components, then reference those ids inside EventLink (or ActionLink, or Form) components. Using Zone components inside any kind of loop may cause additional problems, as Tapestry will <em>uniqueify</em> the client id you specify (appending an index number).</p><p>The show and update function names are converted to lower case; all the methods of Tapestry.ElementEffect should have all lower-case names. Because client-side JavaScript is so fluid (new methods may be added to existing objects), Tapestry makes no attempt to validate the function names ... however, if the names are not valid, then the default show and highlight methods will be used.</p><h3 id="AjaxandZones-MoreInformation">More Information</h3><p>For examples of extending a Form with a Zone and updating multiple zones at once, see the <a shape="rect" href="
 ajax-components-faq.html">Ajax Components FAQ</a>.</p><p><span class="confluence-anchor-link" id="AjaxandZones-autocomplete"></span></p><h2 id="AjaxandZones-AutocompleteMixin">Autocomplete Mixin</h2><p></p><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:0 1em">
 <p>    <strong>JumpStart Demo:</strong><br clear="none">
-    <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/autocompletemixin" >Autocomplete Mixin</a></p></div><p>The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html">Autocomplete</a> mixin exists to allow a text field to query the server for completions for a partially entered phrase. It is often used in situations where the field exists to select a single value from a large set, too large to successfully download to the client as a drop down list; for example, when the number of values to select from is numbered in the thousands.</p><p>Autocomplete can be added to an existing text field:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+    <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/autocompletemixin" >Autocomplete Mixin</a></p></div>The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html">Autocomplete</a> mixin exists to allow a text field to query the server for completions for a partially entered phrase. It is often used in situations where the field exists to select a single value from a large set, too large to successfully download to the client as a drop down list; for example, when the number of values to select from is numbered in the thousands.<p>Autocomplete can be added to an existing text field:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  &lt;t:textfield t:id="accountName" t:mixins="autocomplete" size="100"/&gt;
 </pre>
 </div></div><p>The mixin can be configured in a number of ways, see the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html">component reference</a>.</p><p>When the user types into the field, the client-side JavaScript will send a request to the server to get completions.</p><p>You must write an event handler to provide these completions. The name of the event is "providecompletions". The context is the partial input value, and the return value will be converted into the selections for the user.</p><p>For example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">

Modified: websites/production/tapestry/content/aliases.html
==============================================================================
--- websites/production/tapestry/content/aliases.html (original)
+++ websites/production/tapestry/content/aliases.html Sun Jul 26 23:19:56 2015
@@ -27,6 +27,14 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
+    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,62 +65,84 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent">
+<div id="ConfluenceContent"><p>
 
-<div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Deprecated since 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
+</p><div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Deprecated since 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 <p>Use ServiceOverrides instead. Aliases will be removed starting in 5.3.</p></div></div>
 <div style="border-right: 20px solid #ffcccc;border-left: 20px solid #ffcccc;">
+<p>&#160;</p></div><div class="aui-label" style="float:right" title="Related Articles">
 
 
-<div class="navmenu" style="float:right; background:white; margin:3px; padding:3px">
-<div class="confluence-information-macro confluence-information-macro-information"><p class="title">Related Articles</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
-<ul><li><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html" title="IoC Cookbook - Overriding IoC Services">IoC Cookbook: Overriding Services</a></li></ul>
-</div></div></div> 
 
-<h1><a shape="rect" name="Aliases-Introduction"></a>Introduction</h1>
 
-<p>Tapestry goes to great lengths so that you can use the <a shape="rect" href="#Aliases-inject.html">Inject</a> annotation on a field and provide no additional data, yet end up with the correct object or service.</p>
 
-<p>In many cases, Tapestry must match a field type to an available IoC service.</p>
 
-<p>If there is only single service in the registry that implements the service, Tapestry will utilize that service.</p>
 
-<p>When there is more than one such service, it is necessary to disambiguate which service is to be injected. To disambiguate globally (across all injections), you must create an alias from the service interface directly to the particular service.</p>
 
-<p>This takes the form of a contribution to the Alias service.</p>
-
-<p>The Alias service has additional purposes: first, it allows for spot overrides on injected services, based on the application's mode. Currently, the only mode is "servlet", but future modes may include "portlet" and possibly "offline".</p>
-
-<p>Secondly, the companion AliasOverrides service configuration allows for spot overrides of specific services, without disturbing the rest of the network of services within the IoC Registry.</p>
-
-<h1><a shape="rect" name="Aliases-ContributinganAlias"></a>Contributing an Alias</h1>
-
-<p>To contribute a new service to the Alias service, you must first decide on a logical name. Often, this is the name of the service interface implemented by the service.</p>
-
-<p>You can then contribute into the Infrastructure service's configuration:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-  public static void contributeAlias(@InjectService("MyService") MyService myService,
-     Configuration&lt;AliasContribution&gt; configuration)
-  {
-     configuration.add(AliasContribution.create(MyService.class, myService));
-  }
-</pre>
-</div></div>
-
-<p>The above example follows a typical pattern; the service to be vended is injected into the contributor method, using the explicit InjectService annotation. A contribution is made providing the service type.</p>
-
-<p>Notice that the contribution doesn't <em>have</em> to be a service; you can just instantiate an object inside the contribution method and contribute that. That's what we're doing in the example, though we're using a create() static method rather than <strong>new</strong> (just to smooth out some Java Generics ugliness).</p>
-
-<h1><a shape="rect" name="Aliases-ContributingtoAliasOverrides"></a>Contributing to AliasOverrides</h1>
-
-<p>To override a service, you need to know its service interface name.</p>
-
-<p>You can then make a contribution to the AliasOverrides service configuration, as described in the previous section.</p>
-
-<p>The object contributed as an override will mask the default contribution.</p>
-</div></div>
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="page-navigation.html">Page Navigation</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="page-life-cycle.html">Page Life Cycle</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="component-rendering.html">Component Rendering</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="component-events.html">Component Events</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="component-events-faq.html">Component Events FAQ</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="request-processing.html">Request Processing</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>&#160;</p><p>See <a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a></p><h1 id="Aliases-Introduction">Introduction</h1><p>Tapestry goes to great lengths so that you can use the [Inject|#inject.html] annotation on a field and provide no additional data, yet end up with the correct object or service.</p><p>In many cases, Tapestry must match a field type to an available IoC service.</p><p>If there is only single service in the registry that implements the service, Tapestry will utilize that service.</p><p>When there is more than one such service, it is necessary to disambiguate which service is to be injected. To disambiguate globally (across all injections), you must create an alias from the service interface directly to the particular service.</p><p>This takes the form of a contribution to the Alias service.</p><p>The Alias service has additional purposes: first, it allows for spot overrides on injected services, based 
 on the application's mode. Currently, the only mode is "servlet", but future modes may include "portlet" and possibly "offline".</p><p>Secondly, the companion AliasOverrides service configuration allows for spot overrides of specific services, without disturbing the rest of the network of services within the IoC Registry.</p><h1 id="Aliases-ContributinganAlias">Contributing an Alias</h1><p>To contribute a new service to the Alias service, you must first decide on a logical name. Often, this is the name of the service interface implemented by the service.</p><p>You can then contribute into the Infrastructure service's configuration:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public static void contributeAlias(@InjectService("MyService") MyService myService,
+        Configuration&lt;AliasContribution&gt; configuration)
+{
+    configuration.add(AliasContribution.create(MyService.class, myService));
+}</pre>
+</div></div><p>&#160;</p><p>&#160;</p><p>The above example follows a typical pattern; the service to be vended is injected into the contributor method, using the explicit InjectService annotation. A contribution is made providing the service type.</p><p>Notice that the contribution doesn't _have_ to be a service; you can just instantiate an object inside the contribution method and contribute that. That's what we're doing in the example, though we're using a create() static method rather than *new* (just to smooth out some Java Generics ugliness).</p><h1 id="Aliases-ContributingtoAliasOverrides">Contributing to AliasOverrides</h1><p>To override a service, you need to know its service interface name.</p><p>You can then make a contribution to the AliasOverrides service configuration, as described in the previous section.</p><p>The object contributed as an override will mask the default contribution.</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/application-module-class-cheat-sheet.html
==============================================================================
--- websites/production/tapestry/content/application-module-class-cheat-sheet.html (original)
+++ websites/production/tapestry/content/application-module-class-cheat-sheet.html Sun Jul 26 23:19:56 2015
@@ -67,15 +67,14 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent">
-
-<style type="text/css">/*<![CDATA[*/
-div.rbtoc1437340809765 {padding: 0px;}
-div.rbtoc1437340809765 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1437340809765 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style><div class="toc-macro rbtoc1437340809765">
-<ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Namingconventions">Naming conventions</a>
+<div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1437952782331 {padding: 0px;}
+div.rbtoc1437952782331 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1437952782331 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1437952782331">
+<ul class="toc-indentation"><li>Related Articles</li></ul>
+<ul><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Namingconventions">Naming conventions</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Thebindmethod">The bind method</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Servicebuildermethods">Service builder methods</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Contributemethods">Contribute methods</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Unordered">Unordered</a></li></ul>
 </li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Decoratemethods">Decorate methods</a></li></ul>
@@ -84,33 +83,74 @@ div.rbtoc1437340809765 li {margin-left:
 </li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Loadservicesonregistrystartup">Load services on registry startup</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Defineservicescope">Define service scope</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Disambiguateservices">Disambiguate services</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-WithserviceId">With service Id</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-WithMarkers">With Markers</a></li></ul>
 </li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Overrideexistingservices">Override existing services</a></li></ul>
-</div>
-
-<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>
+</div><p>&#160;The <strong>Application Module</strong> class is a simple Java class used to configure Tapestry. A system of annotations and naming conventions allows Tapestry to determine what services are provided by the module to your application. This is the place where you bind your custom implementation of services, contribute to, decorate and override existing services.</p><div class="aui-label" style="float:right" title="Related Articles">
 
-<p></p>
 
-<p>The <strong>Application Module</strong> class is a plain Java class. A system of annotations and naming conventions allows Tapestry to determine what services are provided by the module to your application. This is the place where you bind your custom implementation of services, contribute to, decorate and override existing services.</p>
 
-<p>For complete documentation, you should refer to the <a shape="rect" href="defining-tapestry-ioc-services.html">IOC Service guideline</a>.</p>
 
-<h2 id="ApplicationModuleClassCheatSheet-Namingconventions">Naming conventions</h2>
 
-<p>The use of naming conventions implies that every public method of your module class should be meaningful to Tapestry: it either should follow the naming conventions, or should have an appropriate annotation.  Any extra public methods will result in startup exceptions ... this helps identify methods names that have typos.</p>
 
-<p>Methods should be <strong>public</strong> and, preferably <strong>static</strong>.</p>
 
-<div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
-<p>Allowing for non-static methods may have been a design error, a kind of premature optimization. The thinking was that the module could have common dependencies that it could then easily access when building services. This was partly about runtime efficiency but mostly about reducing redundancy in the various service building, contribution, and decorating methods; the ServiceBinder came later, and was a better solution (trading runtime efficiency for developer ease of use).</p></div></div>
 
-<h3 id="ApplicationModuleClassCheatSheet-Thebindmethod">The bind method</h3>
-
-<p>Every module may have an optional, static bind() method which is passed a ServiceBinder. By using the ServiceBinder, you will let Tapestry <em>autobuild</em> your services. Autobuilding is the <strong>preferred way</strong> to instantiate your services.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-package org.example.myapp.services;
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="application-module-class-cheat-sheet.html">Application Module Class Cheat Sheet</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="symbols.html">Symbols</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="tapestry-ioc-configuration.html">Tapestry IoC Configuration</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="response-compression.html">Response Compression</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="configuration.html">Configuration</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>For complete documentation, you should refer to the <a shape="rect" href="defining-tapestry-ioc-services.html">IOC Service guideline</a>.</p><h2 id="ApplicationModuleClassCheatSheet-Namingconventions">Naming conventions</h2><p>The use of naming conventions implies that every public method of your module class should be meaningful to Tapestry: it either should follow the naming conventions, or should have an appropriate annotation. Any extra public methods will result in startup exceptions ... this helps identify methods names that have typos.</p><p>Methods should be <strong>public</strong> and, preferably <strong>static</strong>.</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Allowing for non-static methods may have been a design error, a kind of premature optimization. The thinking was that the
  module could have common dependencies that it could then easily access when building services. This was partly about runtime efficiency but mostly about reducing redundancy in the various service building, contribution, and decorating methods; the ServiceBinder came later, and was a better solution (trading runtime efficiency for developer ease of use).</p></div></div><h3 id="ApplicationModuleClassCheatSheet-Thebindmethod">The bind method</h3><p>Every module may have an optional, static bind() method which is passed a ServiceBinder. By using the ServiceBinder, you will let Tapestry <em>autobuild</em> your services. Autobuilding is the <strong>preferred way</strong> to instantiate your services.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">package org.example.myapp.services;
 
 import org.apache.tapestry5.ioc.ServiceBinder;
 
@@ -122,19 +162,8 @@ public class MyAppModule
   }
 }
 </pre>
-</div></div>
-
-<p>Allowing Tapestry to instantiate your service implementations means that, during development, they will live-reload.</p>
-
-<p>Of course, you can make repeated calls to ServiceBinder.bind(), to bind additional services.</p>
-
-<h3 id="ApplicationModuleClassCheatSheet-Servicebuildermethods">Service builder methods</h3>
-
-<p>Sometime you need to do more than just instantiate the class with dependencies. It is common inside Tapestry for one service to be a listener to events from another service. In that situation (or other similar ones), a service builder method is useful, as it shifts control back to your code, where you have the freedom to perform any additional operations necessary to get the service implementation up and running.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-package org.example.myapp.services;
+</div></div><p>Allowing Tapestry to instantiate your service implementations means that, during development, they will live-reload.</p><p>Of course, you can make repeated calls to ServiceBinder.bind(), to bind additional services.</p><h3 id="ApplicationModuleClassCheatSheet-Servicebuildermethods">Service builder methods</h3><p>Sometime you need to do more than just instantiate the class with dependencies. It is common inside Tapestry for one service to be a listener to events from another service. In that situation (or other similar ones), a service builder method is useful, as it shifts control back to your code, where you have the freedom to perform any additional operations necessary to get the service implementation up and running.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">package org.example.myapp.services;
 
 public class MyAppModule
 {
@@ -144,15 +173,8 @@ public class MyAppModule
   }
 }
 </pre>
-</div></div>
-
-<p>Here the service interface is Indexer. Tapestry IoC doesn't know about the IndexerImpl class (the service implementation of the Indexer service), but it does know about the build() method. Since Tapestry isn't instantiating the implementation class, there is no possibility of live class reloading.</p>
-
-<p>Here's a more complicated example:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-    @Marker(ClasspathProvider.class)
+</div></div><p>Here the service interface is Indexer. Tapestry IoC doesn't know about the IndexerImpl class (the service implementation of the Indexer service), but it does know about the build() method. Since Tapestry isn't instantiating the implementation class, there is no possibility of live class reloading.</p><p>Here's a more complicated example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">    @Marker(ClasspathProvider.class)
     public static AssetFactory buildClasspathAssetFactory(ResourceCache resourceCache,
             ClasspathAssetAliasManager aliasManager, AssetPathConverter converter)
     {
@@ -163,15 +185,8 @@ public class MyAppModule
         return factory;
     }
 </pre>
-</div></div>
-
-<p>What's important in this example is that ClasspathAssetFactory, the implementation class, implements the InvalidationListener interface.  AssetFactory, the service interface, does <strong>not</strong> extend the InvalidationListener interface.</p>
-
-<p>Tapestry has evolved some additional tools to "have your cake and eat it too"; the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Autobuild.html">Autobuild</a> annotation takes care of instantiating a service implementation, with dependencies, allowing your code to focus on the extra initialization logic, and not on the dependencies:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-    public static PersistentFieldStrategy buildClientPersistentFieldStrategy(LinkCreationHub linkCreationHub, @Autobuild
+</div></div><p>What's important in this example is that ClasspathAssetFactory, the implementation class, implements the InvalidationListener interface. AssetFactory, the service interface, does <strong>not</strong> extend the InvalidationListener interface.</p><p>Tapestry has evolved some additional tools to "have your cake and eat it too"; the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Autobuild.html">Autobuild</a> annotation takes care of instantiating a service implementation, with dependencies, allowing your code to focus on the extra initialization logic, and not on the dependencies:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">    public static PersistentFieldStrategy buildClientPersistentFieldStrategy(LinkCreationHub linkCreationHub, @Autobuild
     ClientPersistentFieldStrategy service)
     {
         linkCreationHub.addListener(service);
@@ -179,32 +194,14 @@ public class MyAppModule
         return service;
     }
 </pre>
-</div></div>
-
-<h3 id="ApplicationModuleClassCheatSheet-Contributemethods">Contribute methods</h3>
-
-<p>One of the key concepts on Tapestry IoC is <strong>distributed configuration</strong> to provide extensibility and modularity. The distributed part refers to the fact that any module may make contributions to any service's configuration. The extensibility comes from the fact multiple modules may all contribute to the same service configuration. There exist three styles of configuration with matching contributions, and every Tapestry service is marked with an annotation to indicate the type of configuration it requires</p>
-
-<h4 id="ApplicationModuleClassCheatSheet-Unordered">Unordered </h4>
-
-<p>Services will be annotated with @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/UsesConfiguration.html">UsesConfiguration</a>.</p>
-
-<p>For example, here's a kind of tapestry internal service that requires a list of Coercion tuples to be able to coerce values from one type to another (i.e. from string to the target type when reading values from the HTTP request)</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-public TypeCoercerImpl(Collection&lt;CoercionTuple&gt; tuples)
+</div></div><h3 id="ApplicationModuleClassCheatSheet-Contributemethods">Contribute methods</h3><p>One of the key concepts on Tapestry IoC is <strong>distributed configuration</strong> to provide extensibility and modularity. The distributed part refers to the fact that any module may make contributions to any service's configuration. The extensibility comes from the fact multiple modules may all contribute to the same service configuration. There exist three styles of configuration with matching contributions, and every Tapestry service is marked with an annotation to indicate the type of configuration it requires</p><h4 id="ApplicationModuleClassCheatSheet-Unordered">Unordered</h4><p>Services will be annotated with @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/UsesConfiguration.html">UsesConfiguration</a>.</p><p>For example, here's a kind of tapestry internal service that requires a list of Coercion tupl
 es to be able to coerce values from one type to another (i.e. from string to the target type when reading values from the HTTP request)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public TypeCoercerImpl(Collection&lt;CoercionTuple&gt; tuples)
 {
     // ...
 }
 </pre>
-</div></div>
-
-<p>On the contribution side, a service contribution method sees a Configuration object:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-public static void contributeTypeCoercer(Configuration&lt;CoercionTuple&gt; configuration) {
+</div></div><p>On the contribution side, a service contribution method sees a Configuration object:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public static void contributeTypeCoercer(Configuration&lt;CoercionTuple&gt; configuration) {
 {
     // Create Coercion tuple here
     // ...
@@ -212,62 +209,7 @@ public static void contributeTypeCoercer
     configuration.add(myTuple);
 }
 </pre>
-</div></div>
-
-<h3 id="ApplicationModuleClassCheatSheet-Decoratemethods">Decorate methods</h3>
-
-<p><em>content under development</em></p>
-
-<h2 id="ApplicationModuleClassCheatSheet-Annotations">Annotations</h2>
-
-<p>Main Article: <a shape="rect" href="annotations.html">Annotations</a></p>
-
-<p>Tapestry 5.2 comes with a set of annotations to better your understanding of module classes.</p>
-
-<p><em>content under development</em></p>
-
-<h2 id="ApplicationModuleClassCheatSheet-parameter-typesParametertypes"><span class="confluence-anchor-link" id="ApplicationModuleClassCheatSheet-parameter-types"></span>Parameter types</h2>
-
-<p>These methods may have any number of parameters, tapestry will try to resolve each parameter value as a configuration element or a registry element.</p>
-
-<h3 id="ApplicationModuleClassCheatSheet-Configurationparametertypes">Configuration parameter types</h3>
-
-<p><em>content under development</em></p>
-
-<h3 id="ApplicationModuleClassCheatSheet-Linktoservices">Link to services</h3>
-
-<p><em>content under development</em></p>
-
-<h3 id="ApplicationModuleClassCheatSheet-Symbols">Symbols</h3>
-
-<p>Main Article: <a shape="rect" href="symbols.html">Symbols</a></p>
-
-<p><em>content under development</em></p>
-
-<h2 id="ApplicationModuleClassCheatSheet-Loadservicesonregistrystartup">Load services on registry startup</h2>
-
-<p><em>content under development</em></p>
-
-<h2 id="ApplicationModuleClassCheatSheet-Defineservicescope">Define service scope</h2>
-
-<p><em>content under development</em></p>
-
-<h2 id="ApplicationModuleClassCheatSheet-Disambiguateservices">Disambiguate services</h2>
-
-<p><em>content under development</em></p>
-
-<h3 id="ApplicationModuleClassCheatSheet-WithserviceId">With service Id</h3>
-
-<p><em>content under development</em></p>
-
-<h3 id="ApplicationModuleClassCheatSheet-WithMarkers">With Markers</h3>
-
-<p><em>content under development</em></p>
-
-<h2 id="ApplicationModuleClassCheatSheet-Overrideexistingservices">Override existing services</h2>
-
-<p><em>content under development</em></p>
-</div>
+</div></div><h3 id="ApplicationModuleClassCheatSheet-Decoratemethods">Decorate methods</h3><p><em>content under development</em></p><h2 id="ApplicationModuleClassCheatSheet-Annotations">Annotations</h2><p>Main Article: <a shape="rect" href="annotations.html">Annotations</a></p><p>Tapestry 5.2 comes with a set of annotations to better your understanding of module classes.</p><p><em>content under development</em></p><h2 id="ApplicationModuleClassCheatSheet-parameter-typesParametertypes"><span class="confluence-anchor-link" id="ApplicationModuleClassCheatSheet-parameter-types"></span>Parameter types</h2><p>These methods may have any number of parameters, tapestry will try to resolve each parameter value as a configuration element or a registry element.</p><h3 id="ApplicationModuleClassCheatSheet-Configurationparametertypes">Configuration parameter types</h3><p><em>content under development</em></p><h3 id="ApplicationModuleClassCheatSheet-Linktoservices">Link to services</h3><p><em>cont
 ent under development</em></p><h3 id="ApplicationModuleClassCheatSheet-Symbols">Symbols</h3><p>Main Article: <a shape="rect" href="symbols.html">Symbols</a></p><p><em>content under development</em></p><h2 id="ApplicationModuleClassCheatSheet-Loadservicesonregistrystartup">Load services on registry startup</h2><p><em>content under development</em></p><h2 id="ApplicationModuleClassCheatSheet-Defineservicescope">Define service scope</h2><p><em>content under development</em></p><h2 id="ApplicationModuleClassCheatSheet-Disambiguateservices">Disambiguate services</h2><p><em>content under development</em></p><h3 id="ApplicationModuleClassCheatSheet-WithserviceId">With service Id</h3><p><em>content under development</em></p><h3 id="ApplicationModuleClassCheatSheet-WithMarkers">With Markers</h3><p><em>content under development</em></p><h2 id="ApplicationModuleClassCheatSheet-Overrideexistingservices">Override existing services</h2><p><em>content under development</em></p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/bean-validation.html
==============================================================================
--- websites/production/tapestry/content/bean-validation.html (original)
+++ websites/production/tapestry/content/bean-validation.html Sun Jul 26 23:19:56 2015
@@ -33,7 +33,6 @@
   <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
   <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
   <script src='/resources/highlighter/scripts/shBrushJScript.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
   <script type="text/javascript">
   SyntaxHighlighter.defaults['toolbar'] = false;
   SyntaxHighlighter.all();
@@ -73,8 +72,37 @@
 <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
 </div></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
-<p>&#160;</p></div><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><h1 id="BeanValidation-IntegrateJSR303-BeanValidationAPI">Integrate JSR 303 - Bean Validation API</h1><p>Tapestry provides a powerful validation mechanism (see <a shape="rect" href="forms-and-validation.html">Forms and Validation</a>). Among other things this mechanism allows you to annotate your domain model classes with the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/Validate.html">@Validate</a> annotation. This annotation is problematic if your domain model is used in non-Tapestry applications as well as in Tapestry applications. Your non-Tapestry application becomes dependent on <em>tapestry5-annotations</em> module. To make your domain model independent from Tapestry you can use the <a shape="rect" class="external
 -link" href="http://jcp.org/en/jsr/detail?id=303" >JSR 303: Bean Validation</a>. This library provides integration between Tapestry and JSR-303.</p><h2 id="BeanValidation-Configuration">Configuration</h2><p>The Tapestry's JSR 303 - Bean Validation Library is responsible for configuring and bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a> for you. In order to use this library you have to choose an implementation of the JSR-303 specification like <a shape="rect" class="external-link" href="https://www.hibernate.org/412.html" >Hibernate Validator 4.x</a>. This library is not specific to any implementation of JSR-303 and will work with any implementation of your choice.</p><h3 id="BeanValidation-BootstrapingtheBeanValidator">Bootstraping the Bean Validator</h3><p>The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/
 BeanValidatorSource.html">BeanValidatorSource</a> service is responsible for bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>. You can contribute a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/BeanValidatorConfigurer.html">BeanValidatorConfigurer</a> to the configuration of this service in order to participate on the configuration of <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<p>&#160;</p></div><p><strong>Bean validation</strong> involves validating user input using Tapestry's built-in support for the <a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=303" >JSR 303 Bean Validation API</a>.</p><div class="aui-label" style="float:right" title="Related Articles">
+
+
+
+
+
+
+
+
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="bean-validation.html">Bean Validation</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="forms-and-validation.html">Forms and Validation</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>Tapestry has always provided a powerful non-JSR 303 validation mechanism (see <a shape="rect" href="forms-and-validation.html">Forms and Validation</a>). Among other things this mechanism allows you to annotate your domain model classes with the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/Validate.html">@Validate</a> annotation. However, this annotation is problematic if your domain model is used in non-Tapestry applications as well as in Tapestry applications. Your non-Tapestry application becomes dependent on <em>tapestry5-annotations</em> module. To make your domain model independent from Tapestry you can use the <a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=303" >JSR 303: Bean Validation</a> instead. This library provides integration between Tapestry and JSR-303.</p><h2 id="BeanValidation-Configuration">Configuration</h2><p>The Tapestry's JSR 303 - Bean Validation Li
 brary is responsible for configuring and bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a> for you. In order to use this library you have to choose an implementation of the JSR-303 specification like <a shape="rect" class="external-link" href="https://www.hibernate.org/412.html" >Hibernate Validator 4.x</a>. This library is not specific to any implementation of JSR-303 and will work with any implementation of your choice.</p><h3 id="BeanValidation-BootstrapingtheBeanValidator">Bootstraping the Bean Validator</h3><p>The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/BeanValidatorSource.html">BeanValidatorSource</a> service is responsible for bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>. You can contribute a <
 a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/BeanValidatorConfigurer.html">BeanValidatorConfigurer</a> to the configuration of this service in order to participate on the configuration of <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Contribute(BeanValidatorSource.class)
 public static void provideBeanValidatorConfigurer(OrderedConfiguration&lt;BeanValidatorConfigurer&gt; configuration)
 {

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

Modified: websites/production/tapestry/content/client-side-javascript.html
==============================================================================
--- websites/production/tapestry/content/client-side-javascript.html (original)
+++ websites/production/tapestry/content/client-side-javascript.html Sun Jul 26 23:19:56 2015
@@ -31,8 +31,6 @@
   <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
   <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
   <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
   <script type="text/javascript">
   SyntaxHighlighter.defaults['toolbar'] = false;
   SyntaxHighlighter.all();
@@ -67,8 +65,100 @@
   </div>
 
 <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>Perhaps nothing in Tapestry has changed over the years so much as the way client-side JavaScript is supported. From the get go, the goal was to make JavaScript a first-class citizen in the Tapestry world, and make it easy to encapsulate JavaScript within components.</p><p>The <a shape="rect" href="legacy-javascript.html">legacy JavaScript</a> page discusses the earlier approaches; the main feature of Tapestry 5.4 is a total rewrite of all things client-side, with the following goals:</p><ul><li>Break the hard linkage of Tapestry to <a shape="rect" class="external-link" href="http://prototypejs.org/" >Prototype</a> and <a shape="rect" class="external-link" href="http://script.aculo.us/" >Scriptaculous</a>, by introducing an abstraction layer</li><li>Remove the clumsy <code>Tapestry</code> a
 nd <code>T5</code> "namespaces"</li><li>Reduce the amount of page-specific JavaScript initialization</li><li>Make it easier to override behavior associated with client elements</li><li>Support CoffeeScript and (potentially) other languages that target JavaScript</li><li>Organize client-side JavaScript using <a shape="rect" href="javascript-modules.html">modules</a></li><li>Make pages load faster</li><li>Integrate <a shape="rect" class="external-link" href="http://getbootstrap.com/" >Bootstrap</a></li><li>Make it easier for rich client libraries such as&#160;<a shape="rect" class="external-link" href="http://backbonejs.org/" >Backbone</a> or&#160;<a shape="rect" class="external-link" href="https://angularjs.org/" >AngularJS</a> to operate within a page</li><li>Properly document Tapestry's client support</li></ul><h3 id="Client-SideJavaScript-TheOverallVision">The Overall Vision</h3><p>The overall vision for the client-side in Tapestry is encapsulation, at several different levels.</p
 ><p>On the server-side, a Tapestry component (or mixin) will exposes configurable parameters. The component will write DOM elements or attributes, as well as some amount of JavaScript initialization. The encapsulation here allows developers with little or no knowledge of client-side JavaScript to enjoy the benefits (as consumers of components created by developers who are versed in client-side coding and Tapestry components).</p><p>On the client-side, the JavaScript combines with the special markup to produce the behaviors that are desired ... anything from controlling the initial focus field, to performing client-side input field validation, to running complex Ajax workflows.</p><p>Where possible, all of this behavior is driven by <code>data-</code> attributes on the elements, combined with top-level event handlers. On the client side, events are used not only to respond directly to user actions (with "click", "mouseOver", "submit", or other event listeners) but also to allow eleme
 nts to collaborate in various ways. &#160;For example, input validation is based on triggering a specific custom event on each form control element, and top-level event handlers can then manage the validation for any number of fields.</p><h3 id="Client-SideJavaScript-Prototypevs.jQuery">Prototype vs. jQuery</h3><p>For several years, it has been obvious that Tapestry "backed the wrong horse" with respect to Prototype and jQuery. When the first code was being laid down in 2007 or 2008, it wasn't so clear that jQuery with its odd abstractions and unfamiliar approach, would go on to conquer the world. Meanwhile, Prototype was very strongly integrated into Ruby on Rails and had first class documentation and books.</p><p>That being said, jQuery may not be the be-all and end-all. Tapestry 5.4 introduces an abstraction layer, that allows many components to write code that doesn't care whether the foundation framework in Prototype or jQuery. This is especially useful during the arduous proce
 ss of moving Tapestry 5.3 client-side code forward to 5.4.</p><p>If you like jQuery then there's no problem: write your application using just jQuery and you can ignore a lot of the features in the abstraction layer. Your code will likely be just a bit more efficient.</p><p>If you are building a reusable component or library, writing to the abstraction layer may be worth the effort; it is entirely possible that someone may write a replacement for the abstraction layer that targets your favorite foundation framework, such as ExtJS, MooTools, or something not even known of today.</p><h3 id="Client-SideJavaScript-Heavyvs.Light">Heavy vs. Light</h3><p>Earlier Tapestry JavaScript was&#160;<em>heavy</em>. Essentially, each component would write some very specific JavaScript initialization that would include the component's DOM id and many other details. This initialization would reference a function on the <code>T5.inits</code> namespace.</p><p>The function there would typically locate th
 e specific element by its client DOM id, then attach event handlers to the one element. It might also create some form of client-side controller object. There were issues due to this: for complex pages (or perhaps even typical pages), the "blob" of JavaScript initialization at the bottom of the page could be quite large.</p><p>The use of individual event handlers meant that Tapestry applications would use more client-side objects that a bespoke jQuery solution ... because the normal approach in jQuery is to attach a single event handler to the document or body that handles any events that bubble up to the top&#160;<em>and</em> match a CSS selector.</p><p>In Tapestry 5.4, the goal is to make things&#160;<em>light</em>. In most cases, there will not be a specific initialization function; instead a <a shape="rect" href="javascript-modules.html">JavaScript module</a> will be loaded, and it will install one or more top-level event handlers; the elements will have <a shape="rect" class="e
 xternal-link" href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes" ><code>data-</code> attributes</a> that are used by those top level handlers to recognize which elements they are responsible for.</p><p>This is more of a full lifecycle approach; adding or removing page content (such as with a&#160;<a shape="rect" href="ajax-and-zones.html">Zone</a> component) is both cheaper and less error prone using top-level event handlers than per-element event handlers; there's also less of a chance of memory leaks under Internet Explorer.</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Internet Explorer is pretty well known for memory leaks; its DOM and JavaScript run in different kinds of memory, which are garbage collected individually. This means that a reference from JavaScript t
 o a DOM element will keep the DOM element live, even if that's the only reference to the DOM element anywhere. Meanwhile, event handler JavaScript functions are kept live from the DOM element, making a cycle that can't be broken. Libraries like Prototype and jQuery have to expend some effort to break this link by unregistering event handlers from DOM elements when removing them from the DOM.</p></div></div><p>A specific example of this approach is how client-side validation now works; in the past, there was a complex system of classes and event listeners that were specific to each individual field. Field controllers had to register with Form controllers. Validators had to register with Field controllers.</p><p>Under 5.4, there are a number of&#160;<code>data-</code> attributes that can be attached to any DOM element. A form will search for elements with a non-blank value for&#160;<code>data-validation</code>; each such element has a series of custom events triggered on it. The top-l
 evel handlers for those events will receive notifications for elements throughout the document.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>t5/core/validation.coffee (partial)</b></div><div class="codeContent panelContent pdl">
+<div id="ConfluenceContent"><p>Perhaps nothing in Tapestry has changed over the years so much as the way client-side JavaScript is supported. From the get go, the goal was to make JavaScript a first-class citizen in the Tapestry world, and make it easy to encapsulate JavaScript within components.</p><div class="aui-label" style="float:right" title="Related Articles">
+
+
+
+
+
+
+
+
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="ajax-and-zones.html">Ajax and Zones</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="legacy-javascript.html">Legacy JavaScript</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="coffeescript.html">CoffeeScript</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="client-side-javascript.html">Client-Side JavaScript</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="javascript-modules.html">JavaScript Modules</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="javascript-faq.html">JavaScript FAQ</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="ajax-components-faq.html">Ajax Components FAQ</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a>
+                
+                        
+                    </div>
+    </li><li>
+        <div>
+                <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span>        </div>
+
+        <div class="details">
+                        <a shape="rect" href="assets.html">Assets</a>
+                
+                        
+                    </div>
+    </li></ul>
+</div><p>The <a shape="rect" href="legacy-javascript.html">legacy JavaScript</a> page discusses the earlier approaches; the main feature of Tapestry 5.4 is a total rewrite of all things client-side, with the following goals:</p><ul><li>Break the hard linkage of Tapestry to <a shape="rect" class="external-link" href="http://prototypejs.org/" >Prototype</a> and <a shape="rect" class="external-link" href="http://script.aculo.us/" >Scriptaculous</a>, by introducing an abstraction layer</li><li>Remove the clumsy <code>Tapestry</code> and <code>T5</code> "namespaces"</li><li>Reduce the amount of page-specific JavaScript initialization</li><li>Make it easier to override behavior associated with client elements</li><li>Support CoffeeScript and (potentially) other languages that target JavaScript</li><li>Organize client-side JavaScript using <a shape="rect" href="javascript-modules.html">modules</a></li><li>Make pages load faster</li><li>Integrate <a shape="rect" class="external-link" href="
 http://getbootstrap.com/" >Bootstrap</a></li><li>Make it easier for rich client libraries such as&#160;<a shape="rect" class="external-link" href="http://backbonejs.org/" >Backbone</a> or&#160;<a shape="rect" class="external-link" href="https://angularjs.org/" >AngularJS</a> to operate within a page</li><li>Properly document Tapestry's client support</li></ul><h3 id="Client-SideJavaScript-TheOverallVision">The Overall Vision</h3><p>The overall vision for the client-side in Tapestry is encapsulation, at several different levels.</p><p>On the server-side, a Tapestry component (or mixin) will exposes configurable parameters. The component will write DOM elements or attributes, as well as some amount of JavaScript initialization. The encapsulation here allows developers with little or no knowledge of client-side JavaScript to enjoy the benefits (as consumers of components created by developers who are versed in client-side coding and Tapestry components).</p><p>On the client-side, the J
 avaScript combines with the special markup to produce the behaviors that are desired ... anything from controlling the initial focus field, to performing client-side input field validation, to running complex Ajax workflows.</p><p>Where possible, all of this behavior is driven by <code>data-</code> attributes on the elements, combined with top-level event handlers. On the client side, events are used not only to respond directly to user actions (with "click", "mouseOver", "submit", or other event listeners) but also to allow elements to collaborate in various ways. &#160;For example, input validation is based on triggering a specific custom event on each form control element, and top-level event handlers can then manage the validation for any number of fields.</p><h3 id="Client-SideJavaScript-Prototypevs.jQuery">Prototype vs. jQuery</h3><p>For several years, it has been obvious that Tapestry "backed the wrong horse" with respect to Prototype and jQuery. When the first code was being
  laid down in 2007 or 2008, it wasn't so clear that jQuery with its odd abstractions and unfamiliar approach, would go on to conquer the world. Meanwhile, Prototype was very strongly integrated into Ruby on Rails and had first class documentation and books.</p><p>That being said, jQuery may not be the be-all and end-all. Tapestry 5.4 introduces an abstraction layer, that allows many components to write code that doesn't care whether the foundation framework in Prototype or jQuery. This is especially useful during the arduous process of moving Tapestry 5.3 client-side code forward to 5.4.</p><p>If you like jQuery then there's no problem: write your application using just jQuery and you can ignore a lot of the features in the abstraction layer. Your code will likely be just a bit more efficient.</p><p>If you are building a reusable component or library, writing to the abstraction layer may be worth the effort; it is entirely possible that someone may write a replacement for the abstra
 ction layer that targets your favorite foundation framework, such as ExtJS, MooTools, or something not even known of today.</p><h3 id="Client-SideJavaScript-Heavyvs.Light">Heavy vs. Light</h3><p>Earlier Tapestry JavaScript was&#160;<em>heavy</em>. Essentially, each component would write some very specific JavaScript initialization that would include the component's DOM id and many other details. This initialization would reference a function on the <code>T5.inits</code> namespace.</p><p>The function there would typically locate the specific element by its client DOM id, then attach event handlers to the one element. It might also create some form of client-side controller object. There were issues due to this: for complex pages (or perhaps even typical pages), the "blob" of JavaScript initialization at the bottom of the page could be quite large.</p><p>The use of individual event handlers meant that Tapestry applications would use more client-side objects that a bespoke jQuery solut
 ion ... because the normal approach in jQuery is to attach a single event handler to the document or body that handles any events that bubble up to the top&#160;<em>and</em> match a CSS selector.</p><p>In Tapestry 5.4, the goal is to make things&#160;<em>light</em>. In most cases, there will not be a specific initialization function; instead a <a shape="rect" href="javascript-modules.html">JavaScript module</a> will be loaded, and it will install one or more top-level event handlers; the elements will have <a shape="rect" class="external-link" href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes" ><code>data-</code> attributes</a> that are used by those top level handlers to recognize which elements they are responsible for.</p><p>This is more of a full lifecycle approach; adding or removing page content (such as with a&#160;<a shape="rect" href="ajax-and-zones.html">Zone</a> component) is both cheaper and less error prone using top-level event handler
 s than per-element event handlers; there's also less of a chance of memory leaks under Internet Explorer.</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Internet Explorer is pretty well known for memory leaks; its DOM and JavaScript run in different kinds of memory, which are garbage collected individually. This means that a reference from JavaScript to a DOM element will keep the DOM element live, even if that's the only reference to the DOM element anywhere. Meanwhile, event handler JavaScript functions are kept live from the DOM element, making a cycle that can't be broken. Libraries like Prototype and jQuery have to expend some effort to break this link by unregistering event handlers from DOM elements when removing them from the DOM.</p></div></div><p>A specific example of this approach is how clien
 t-side validation now works; in the past, there was a complex system of classes and event listeners that were specific to each individual field. Field controllers had to register with Form controllers. Validators had to register with Field controllers.</p><p>Under 5.4, there are a number of&#160;<code>data-</code> attributes that can be attached to any DOM element. A form will search for elements with a non-blank value for&#160;<code>data-validation</code>; each such element has a series of custom events triggered on it. The top-level handlers for those events will receive notifications for elements throughout the document.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>t5/core/validation.coffee (partial)</b></div><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">define ["underscore", "./dom", "./events", "./utils", "./messages", "./fields"],
   (_, dom, events, utils, messages) -&gt;