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

svn commit: r932830 - in /websites/production/tapestry/content: cache/main.pageCache cookbook.html ioc-cookbook-overriding-ioc-services.html ioc-cookbook-patterns.html ioc-cookbook.html

Author: buildbot
Date: Mon Dec 15 13:20:05 2014
New Revision: 932830

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/cache/main.pageCache
    websites/production/tapestry/content/cookbook.html
    websites/production/tapestry/content/ioc-cookbook-overriding-ioc-services.html
    websites/production/tapestry/content/ioc-cookbook-patterns.html
    websites/production/tapestry/content/ioc-cookbook.html

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

Modified: websites/production/tapestry/content/cookbook.html
==============================================================================
--- websites/production/tapestry/content/cookbook.html (original)
+++ websites/production/tapestry/content/cookbook.html Mon Dec 15 13:20:05 2014
@@ -56,7 +56,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><h1 id="Cookbook-Contents">Contents</h1><p>The Tapestry Cookbook is a collection of tips and tricks for commonly occurring patterns in Tapestry.</p><p></p><ul class="childpages-macro"><li><a shape="rect" href="default-parameter.html">Default Parameter</a> &#8212; <span class="smalltext">Avoiding repetition when using component parameters by adding autoconnect=true</span></li><li><a shape="rect" href="overriding-exception-reporting.html">Overriding Exception Reporting</a> &#8212; <span class="smalltext">Customizing Tapestry's default exception reporting page</span></li><li><a shape="rect" href="error-page-recipe.html">Error Page Recipe</a> &#8212; <span class="smalltext">Serving up a Tapestry page as your site's custom 404 response page</span></li><li><a shape="rect" href="supporting-informal-parameters.html">Supporting Informal Parameters</a> &#8212; <span class="smalltext">How to make your custom component accept and pass on all unknown parameters to the
  underlying HTML element</span></li><li><a shape="rect" href="component-libraries.html">Component Libraries</a> &#8212; <span class="smalltext">How to create a library of your custom components</span></li><li><a shape="rect" href="switching-cases.html">Switching Cases</a> &#8212; <span class="smalltext">Performing the equivalent of a "switch" statement in your component template using blocks and a delegate</span></li><li><a shape="rect" href="enum-parameter-recipe.html">Enum Parameter Recipe</a> &#8212; <span class="smalltext">Using an Enum as a component parameter using coercion</span></li><li><a shape="rect" href="extending-the-if-component.html">Extending the If Component</a> &#8212; <span class="smalltext">Adding a type coercion to enable the If component to test for anything</span></li><li><a shape="rect" href="meta-programming-page-content.html">Meta-Programming Page Content</a> &#8212; <span class="smalltext">Adding an Annotation and a Filter to customize Tapestry's page rend
 ering</span></li><li><a shape="rect" href="using-select-with-a-list.html">Using Select With a List</a> &#8212; <span class="smalltext">Using SelectModel, SelectModelFactory and ValueEncoder for Select menus populated from a database</span></li><li><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a> &#8212; <span class="smalltext">Tips and tricks for using Tapestry's Inversion of Control container</span><ul class="childpages-macro"><li><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html">IoC Cookbook - Basic Services and Injection</a></li><li><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a></li><li><a shape="rect" href="ioc-cookbook-patterns.html">IoC Cookbook - Patterns</a></li><li><a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a></li></ul></li><li><a shape="rect" href="performance-and-clustering.html">Performance and Clustering</a></li></ul><p>&#
 160;</p><p>&#160;</p><p></p><p></p><p></p><p></p><p></p><p>&#160;</p><p>&#160;</p></div>
+<div id="ConfluenceContent"><h1 id="Cookbook-Contents">Contents</h1><p>The Tapestry Cookbook is a collection of mini-tutorials for commonly occurring patterns in Tapestry.</p><p></p><ul class="childpages-macro"><li><a shape="rect" href="default-parameter.html">Default Parameter</a> &#8212; <span class="smalltext">Avoiding repetition when using component parameters by adding autoconnect=true</span></li><li><a shape="rect" href="overriding-exception-reporting.html">Overriding Exception Reporting</a> &#8212; <span class="smalltext">Customizing Tapestry's default exception reporting page</span></li><li><a shape="rect" href="error-page-recipe.html">Error Page Recipe</a> &#8212; <span class="smalltext">Serving up a Tapestry page as your site's custom 404 response page</span></li><li><a shape="rect" href="supporting-informal-parameters.html">Supporting Informal Parameters</a> &#8212; <span class="smalltext">How to make your custom component accept and pass on all unknown parameters to the 
 underlying HTML element</span></li><li><a shape="rect" href="component-libraries.html">Component Libraries</a> &#8212; <span class="smalltext">How to create a library of your custom components</span></li><li><a shape="rect" href="switching-cases.html">Switching Cases</a> &#8212; <span class="smalltext">Performing the equivalent of a "switch" statement in your component template using blocks and a delegate</span></li><li><a shape="rect" href="enum-parameter-recipe.html">Enum Parameter Recipe</a> &#8212; <span class="smalltext">Using an Enum as a component parameter using coercion</span></li><li><a shape="rect" href="extending-the-if-component.html">Extending the If Component</a> &#8212; <span class="smalltext">Adding a type coercion to enable the If component to test for anything</span></li><li><a shape="rect" href="meta-programming-page-content.html">Meta-Programming Page Content</a> &#8212; <span class="smalltext">Adding an Annotation and a Filter to customize Tapestry's page rende
 ring</span></li><li><a shape="rect" href="using-select-with-a-list.html">Using Select With a List</a> &#8212; <span class="smalltext">Using SelectModel, SelectModelFactory and ValueEncoder for Select menus populated from a database</span></li><li><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a> &#8212; <span class="smalltext">A tutorial for using Tapestry's Inversion of Control container</span><ul class="childpages-macro"><li><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html">IoC Cookbook - Basic Services and Injection</a></li><li><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a></li><li><a shape="rect" href="ioc-cookbook-patterns.html">IoC Cookbook - Patterns</a></li><li><a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a></li></ul></li><li><a shape="rect" href="performance-and-clustering.html">Performance and Clustering</a></li></ul><p>&#160;</
 p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/ioc-cookbook-overriding-ioc-services.html
==============================================================================
--- websites/production/tapestry/content/ioc-cookbook-overriding-ioc-services.html (original)
+++ websites/production/tapestry/content/ioc-cookbook-overriding-ioc-services.html Mon Dec 15 13:20:05 2014
@@ -74,14 +74,14 @@ table.ScrollbarTable td.ScrollbarParent
 table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
 table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
 
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html">IoC Cookbook - Basic Services and Injection</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc-cookbook.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="ioc-cookbook-patterns.html">IoC Cookbook - Patterns</a></td><td colspan="1" rowspan=
 "1" class="ScrollbarNextIcon"><a shape="rect" href="ioc-cookbook-patterns.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div><h1 id="IoCCookbook-OverridingIoCServices-OverridingTapestryIoCServices">Overriding Tapestry IoC Services</h1><p>Tapestry is designed to be easy to customize, and the IoC container is the key to that customizability.</p><p>One of Tapestry's most important activities is resolving injected objects; that is, when Tapestry is building an object or service and sees a constructor parameter or a field, it must decide what value to plug in. Most of the time, the injected object is a service defined elsewhere within the Tapestry IoC container.</p><p>However, there are cases where you might want to override how Tapestry operates in some specific way.</p><p>The strategy used to determine what object gets injected is <a shape="rect" href="injection-in-detail.html">defi
 ned inside Tapestry IoC itself</a>; thus we can take advantage of several features of the Tapestry IoC container in order to take control over specific injections.</p><h2 id="IoCCookbook-OverridingIoCServices-ContributingaServiceOverride">Contributing a Service Override</h2><p>In most cases, services are injected by matching just the type; there no @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">InjectService</a> annotation, just a method or constructor parameter whose type matches the service's interface.</p><p>In this case, it is very easy to supply your own alternate implementation of a service.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html">IoC Cookbook - Basic Services and Injection</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc-cookbook.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="ioc-cookbook-patterns.html">IoC Cookbook - Patterns</a></td><td colspan="1" rowspan=
 "1" class="ScrollbarNextIcon"><a shape="rect" href="ioc-cookbook-patterns.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div><h1 id="IoCCookbook-OverridingIoCServices-OverridingTapestryIoCServices">Overriding Tapestry IoC Services</h1><p>Tapestry is designed to be easy to customize, and the IoC container is the key to that customizability.</p><p>One of Tapestry's most important activities is resolving injected objects; that is, when Tapestry is building an object or service and sees a constructor parameter or a field, it must decide what value to plug in. Most of the time, the injected object is a service defined elsewhere within the Tapestry IoC container.</p><p>However, there are cases where you might want to override how Tapestry operates in some specific way.</p><p>The strategy used to determine what object gets injected is <a shape="rect" href="injection-in-detail.html">defi
 ned inside Tapestry IoC itself</a>; thus we can take advantage of several features of the Tapestry IoC container in order to take control over specific injections.</p><h2 id="IoCCookbook-OverridingIoCServices-ContributingaServiceOverride">Contributing a Service Override</h2><p>In most cases, services are injected by matching just the type; there is no @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">InjectService</a> annotation, just a method or constructor parameter whose type matches the service's interface.</p><p>In this case, it is very easy to supply your own alternate implementation of a service, by <em>contributing</em><em> a Service Override</em> in your module class (usually AppModule.java), like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class=
 "codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  @Contribute(ServiceOverride.class)
   public static void setupApplicationServiceOverrides(MappedConfiguration&lt;Class,Object&gt; configuration)
   {
     configuration.addInstance(SomeServiceType.class, SomeServiceTypeOverrideImpl.class);
   }
 ]]></script>
-</div></div><p>The name of the method is not important, as long as the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Contribute.html">Contribute</a> annotation is present on the method.</p><p>In this example, we are using <code>addInstance()</code> which will instantiate the indicated class and handle dependency resolution. (Be careful with this, because in some cases, resolving dependencies of the override class can require checking against the ServiceOverrides service, and you'll get a runtime exception about ServiceOverrides requiring itself!).</p><p>Sometimes you'll want to define the override as a service of its own: this is useful if you want to inject a Logger specific to the service, or if the overriding implementation needs a <a shape="rect" href="tapestry-ioc-configuration.html">service configuration</a>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeade
 r pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
+</div></div><p>The name of the method is not important, as long as the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Contribute.html">Contribute</a> annotation is present on the method.</p><p>In this example, we are using <code>addInstance()</code> which will instantiate the indicated class and handle dependency resolution. (Be careful with this, because in some cases, resolving dependencies of the override class can require checking against the ServiceOverrides service, and you'll get a runtime exception about ServiceOverrides requiring itself!).</p><p>Sometimes you'll want to define the override as a service of its own. This is useful if you want to inject a Logger specific to the service, or if the overriding implementation needs a <a shape="rect" href="tapestry-ioc-configuration.html">service configuration</a>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeade
 r pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  public static void bind(ServiceBinder binder)
   {
     binder.bind(SomeServiceType.class, SomeServiceTypeOverrideImpl.class).withId(&quot;SomeServiceTypeOverride&quot;);

Modified: websites/production/tapestry/content/ioc-cookbook-patterns.html
==============================================================================
--- websites/production/tapestry/content/ioc-cookbook-patterns.html (original)
+++ websites/production/tapestry/content/ioc-cookbook-patterns.html Mon Dec 15 13:20:05 2014
@@ -74,10 +74,7 @@ table.ScrollbarTable td.ScrollbarParent
 table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
 table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
 
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc-cookbook.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a></td><td colspan
 ="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="ioc-cookbook-service-configurations.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>
-<h1 id="IoCCookbook-Patterns-UsingPatterns">Using Patterns </h1>
-
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc-cookbook.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="ioc-cookbook.html">IoC cookbook</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="ioc-cookbook-service-configurations.html">IoC cookbook - Service Configurations</a></td><td colspan
 ="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="ioc-cookbook-service-configurations.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div><h1 id="IoCCookbook-Patterns-UsingPatterns">Using Patterns</h1><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
 <h3>Related Articles</h3>
 <ul class="content-by-label"><li>
             <div>
@@ -116,39 +113,14 @@ table.ScrollbarTable td.ScrollbarNextIco
                 
                             </div>
         </li></ul>
-</div> 
-
-<p>Tapestry IoC has support for implementing several of the <a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)" >Gang Of Four Design Patterns</a>. In fact, the IoC container itself is a pumped up version of the Factory pattern.</p>
-
-<p>The basis for these patterns is often the use of <em>service builder methods</em>, where a <a shape="rect" href="ioc-cookbook-service-configurations.html">configuration</a> for the service is combined with a factory to produce the service implementation on the fly.</p>
-
-<p><span class="confluence-anchor-link" id="IoCCookbook-Patterns-chainofcommand"></span></p>
-<h1 id="IoCCookbook-Patterns-ChainofCommandPattern">Chain of Command Pattern</h1>
-
-<p>Main Article: <a shape="rect" href="chainbuilder-service.html">Chain of Command</a></p>
-
-<p>Let's look at another example, again from the Tapestry code base. The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/InjectionProvider.html">InjectProvider</a> interface is used to process the @Inject annotation on the fields of a Tapestry page or component. Many different instances are combined together to form a <em>chain of command</em>.</p>
-
-<p>The interface has only a single method (this is far from uncommon):</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-public interface InjectionProvider
+</div><p>Tapestry IoC has support for implementing several of the <a shape="rect" class="external-link" href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)" >Gang Of Four Design Patterns</a>. In fact, the IoC container itself is a pumped up version of the Factory pattern.</p><p>The basis for these patterns is often the use of <em>service builder methods</em>, where a <a shape="rect" href="ioc-cookbook-service-configurations.html">configuration</a> for the service is combined with a factory to produce the service implementation on the fly.</p><p><span class="confluence-anchor-link" id="IoCCookbook-Patterns-chainofcommand"></span></p><h1 id="IoCCookbook-Patterns-ChainofCommandPattern">Chain of Command Pattern</h1><p>Main Article: <a shape="rect" href="chainbuilder-service.html">Chain of Command</a></p><p>Let's look at another example, again from the Tapestry code base. The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apach
 e/tapestry5/services/InjectionProvider.html">InjectProvider</a> interface is used to process the @Inject annotation on the fields of a Tapestry page or component. Many different instances are combined together to form a <em>chain of command</em>.</p><p>The interface has only a single method (this is far from uncommon):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public interface InjectionProvider
 {
   boolean provideInjection(String fieldName, Class fieldType, ObjectLocator locator,
       ClassTransformation transformation, MutableComponentModel componentModel);
 }]]></script>
-</div></div>
-
-<p>The return type indicates whether the provider was able to do something. For example, the AssetInjectionProvider checks to see if there's an @Path annotation on the field, and if so, converts the path to an asset, works with the ClassTransformation object to implement injection, and returns true to indicate success. Returns true terminates the chain early, and that true value is ultimately returned to the caller.</p>
-
-<p>In other cases, it returns false and the chain of command continues down to the next provider. If no provider is capable of handling the injection, then the value false is ultimately returned.</p>
-
-<p>The InjectionProvider service is built up via contributions. These are the contributions from the TapestryModule:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-public static void contributeInjectionProvider(
+</div></div><p>The return type indicates whether the provider was able to do something. For example, the AssetInjectionProvider checks to see if there's an @Path annotation on the field, and if so, converts the path to an asset, works with the ClassTransformation object to implement injection, and returns true to indicate success. Returning true terminates the chain early, and that true value is ultimately returned to the caller.</p><p>In other cases, it returns false and the chain of command continues down to the next provider. If no provider is capable of handling the injection, then the value false is ultimately returned.</p><p>The InjectionProvider service is built up via contributions. These are the contributions from the TapestryModule:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public static void contributeInjectionProvider(
     OrderedConfiguration&lt;InjectionProvider&gt; configuration,
     MasterObjectProvider masterObjectProvider,
     ObjectLocator locator,
@@ -166,25 +138,13 @@ public static void contributeInjectionPr
   configuration.add(&quot;Block&quot;, new BlockInjectionProvider(), &quot;before:Default&quot;);
   configuration.add(&quot;Service&quot;, new ServiceInjectionProvider(locator), &quot;after:*&quot;);
 }]]></script>
-</div></div>
-
-<p>And, of course, other contributions could be made in other modules ... if you wanted to add in your own form of injection.</p>
-
-<p>The configuration is converted into a service via a service builder method:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-  public InjectionProvider build(List&lt;InjectionProvider&gt; configuration, ChainBuilder chainBuilder)
+</div></div><p>And, of course, other contributions could be made in other modules ... if you wanted to add in your own form of injection.</p><p>The configuration is converted into a service via a service builder method:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  public InjectionProvider build(List&lt;InjectionProvider&gt; configuration, ChainBuilder chainBuilder)
   {
     return chainBuilder.build(InjectionProvider.class, configuration);
   }]]></script>
-</div></div>
-
-<p>Now, let's see how this is used. The InjectWorker class looks for fields with the InjectAnnotation, and uses the chain of command to inject the appropriate value. However, to InjectWorker, there is no chain ... just a <em>single</em> object that implements the InjectionProvider interface.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-public class InjectWorker implements ComponentClassTransformWorker
+</div></div><p>Now, let's see how this is used. The InjectWorker class looks for fields with the InjectAnnotation, and uses the chain of command to inject the appropriate value. However, to InjectWorker, there is no chain ... just a <em>single</em> object that implements the InjectionProvider interface.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class InjectWorker implements ComponentClassTransformWorker
 {
   private final ObjectLocator locator;
 
@@ -228,11 +188,7 @@ public class InjectWorker implements Com
     }
   }
 }]]></script>
-</div></div>
-
-<p>Reducing the chain to a single object vastly simplifies the code: we've <em>factored out</em> the loop implicit in the chain of command. That eliminates a lot of code, and that's less code to test, and fewer paths through InjectWorker, which lowers its complexity further. We don't have to test the cases where the list of injection providers is empty, or consists of only a single object, or where it's the third object in that returns true: it looks like a single object, it acts like a single object ... but its implementation uses many objects.</p>
-
-<style type="text/css">/*<![CDATA[*/
+</div></div><p>Reducing the chain to a single object vastly simplifies the code: we've <em>factored out</em> the loop implicit in the chain of command. That eliminates a lot of code, and that's less code to test, and fewer paths through InjectWorker, which lowers its complexity further. We don't have to test the cases where the list of injection providers is empty, or consists of only a single object, or where it's the third object in that returns true: it looks like a single object, it acts like a single object ... but its implementation uses many objects.</p><style type="text/css">/*<![CDATA[*/
 table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
 table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
 table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}

Modified: websites/production/tapestry/content/ioc-cookbook.html
==============================================================================
--- websites/production/tapestry/content/ioc-cookbook.html (original)
+++ websites/production/tapestry/content/ioc-cookbook.html Mon Dec 15 13:20:05 2014
@@ -74,12 +74,7 @@ table.ScrollbarTable td.ScrollbarParent
 table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
 table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
 
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="using-select-with-a-list.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="using-select-with-a-list.html">Using Select With a List</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="cookbook.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="cookbook.html">Cookbook</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="performance-and-clustering.html">Performance and Clustering</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="perfo
 rmance-and-clustering.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div> 
-<p></p>
-
-<h1 id="IoCcookbook-TapestryIoCCookbook">Tapestry IoC Cookbook</h1>
-
-<div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="using-select-with-a-list.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="using-select-with-a-list.html">Using Select With a List</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="cookbook.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="cookbook.html">Cookbook</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="performance-and-clustering.html">Performance and Clustering</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="perfo
 rmance-and-clustering.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div><h1 id="IoCcookbook-TapestryIoCCookbook">Tapestry IoC Cookbook</h1><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
 <h3>Related Articles</h3>
 <ul class="content-by-label"><li>
             <div>
@@ -118,21 +113,7 @@ table.ScrollbarTable td.ScrollbarNextIco
                 
                             </div>
         </li></ul>
-</div>
-
-<p>Tapestry Inversion of Control (IoC), though designed specifically for the needs of the Tapestry web framework, may also be employed as a stand-alone IoC container, separate from the rest of Tapestry.</p>
-
-<p>Tapestry IoC is a sophisticated tool that takes some experience to use properly.</p>
-
-<p>The existing documentation is factually correct, but is designed more as a reference, rather than giving the big picture. In the Cookbook, we'll try to show how Tapestry IoC is really used, and build up towards that big picture.</p>
-
-<p>The cookbook will show a bit more about how to use Tapestry IoC, using real examples from the Tapestry code base (both the tapestry-ioc and tapestry-core modules).</p>
-
-<p>A word of caution: several of the examples have been taken from Tapestry's <em>internal</em> code base. Tapestry internals are private, subject to change at any time, so be aware that if you go peeking at the internal source code, it may have changed since the corresponding documentation was written.</p>
-
-<p><strong>Contents:</strong></p>
-
-<ul><li><a shape="rect" href="ioc-cookbook-basic-services-and-injection.html">Basic Services and Injection</a></li><li><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">Overriding Tapestry IoC Services</a></li><li><a shape="rect" href="ioc-cookbook-patterns.html">Using Patterns</a></li><li><a shape="rect" href="ioc-cookbook-service-configurations.html">Service Configurations</a></li></ul></div>
+</div><p>Tapestry Inversion of Control (IoC), though designed specifically for the needs of the Tapestry web framework, may also be employed as a stand-alone IoC container, separate from the rest of Tapestry.</p><p>Tapestry IoC is a sophisticated tool that takes some experience to use properly.</p><p>The IOC documentation in the User Guide is factually correct, but it is designed more as a reference, rather than giving the big picture. In this Cookbook, we'll show a bit more about how to use Tapestry IoC, using real examples from the Tapestry code base (both the tapestry-ioc and tapestry-core modules).</p><p>A word of caution: several of the examples have been taken from Tapestry's <em>internal</em> code base. Tapestry internals are private, subject to change at any time, so be aware that if you go peeking at the internal source code, it may have changed since the corresponding documentation was written.</p><p><strong>Contents:</strong></p><ul><li><a shape="rect" href="ioc-cookbook-
 basic-services-and-injection.html">Basic Services and Injection</a></li><li><a shape="rect" href="ioc-cookbook-overriding-ioc-services.html">Overriding Tapestry IoC Services</a></li><li><a shape="rect" href="ioc-cookbook-patterns.html">Using Patterns</a></li><li><a shape="rect" href="ioc-cookbook-service-configurations.html">Service Configurations</a></li></ul></div>
 </div>
 
 <div class="clearer"></div>