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/19 23:21:30 UTC

svn commit: r958985 [16/29] - in /websites/production/tapestry/content: ./ 2009/09/13/ 2009/10/27/ 2009/11/25/ 2010/07/18/ 2010/07/24/ 2010/10/11/ 2010/10/31/ 2010/11/18/ 2010/12/16/ 2010/12/17/ 2011/01/18/ 2011/03/23/ 2011/03/29/ 2011/03/30/ 2011/03/3...

Modified: websites/production/tapestry/content/integration-testing.html
==============================================================================
--- websites/production/tapestry/content/integration-testing.html (original)
+++ websites/production/tapestry/content/integration-testing.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -59,7 +69,7 @@
 <div id="content">
 <div id="ConfluenceContent"><h1 id="IntegrationTesting-IntegrationTestingwithSelenium">Integration Testing with Selenium</h1><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>The Tapestry Test Utilities is a small library to make it easier to build integration test suites around <a shape="rect" class="external-link" href="http://www.openqa.org/selenium/" >Selenium</a> version 2.14.0.</p><p>The strategy is to start, in process, a Selenimum Server (which, in turn, starts and manages a web browser), a Jetty instance (for the web browser to talk to), and a Selenium client (which talks to the server).</p><p>The client is able to request URLs, fill in form data, click links, and make assertions about output and behavior.</p><h1 id="IntegrationTesting-Usage">Usage</h1><p>The core part of this library is a base class for you to extend your tests classes : <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/test/Se
 leniumTestCase.html">SeleniumTestCase</a>.</p><p>This class is responsible for starting an instance of Jetty to server your web application, as well as a copy of Selenium Server. It also implements the <a shape="rect" class="external-link" href="http://release.openqa.org/selenium-remote-control/0.9.0/doc/java/" >Selenium</a> interface.</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>Before Tapestry 5.2, your class should extend <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/test/AbstractIntegrationTestSuite.html">AbstractIntegrationTestSuite</a></p></div></div><p>Here's an example from one of the Tapestry modules:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><
 b>Your Integration Test Class : SinglePersistenceUnitIntegrationTest.java</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[package org.apache.tapestry5.jpa.integration.app2;
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">package org.apache.tapestry5.jpa.integration.app2;
 
 import org.apache.tapestry5.test.SeleniumTestCase;
 import org.testng.annotations.Test;
@@ -70,26 +80,26 @@ public class SinglePersistenceUnitIntegr
     @Test
     public void persist_entities()
     {
-        open(&quot;/persistitem&quot;);
-        assertEquals(getText(&quot;//span[@id=&#39;name&#39;]&quot;).length(), 0);
+        open("/persistitem");
+        assertEquals(getText("//span[@id='name']").length(), 0);
 
-        clickAndWait(&quot;link=create item&quot;);
-        assertText(&quot;//span[@id=&#39;name&#39;]&quot;, &quot;name&quot;);
+        clickAndWait("link=create item");
+        assertText("//span[@id='name']", "name");
     }
 }
-]]></script>
+</pre>
 </div></div><p>With the SeleniumTestCase class, you can use basic Selenium methods (such as open() and type()) and methods added by the SeleniumTestCase base class (clickAndWait() and assertFieldValue()).</p><p>In addition, the SeleniumTestCase base class extends the normal exception reporting provided by Selenium; when a failure occurs inside Selenium server, a more detailed message, including the current page's HTML source, is reported to System.err.</p><h1 id="IntegrationTesting-Configuration">Configuration</h1><p>All the configuration of your Integration Tests should be in your testng.xml file. Tapestry provides some parameters, in order to have the right environment for your tests.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Parameter</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="
 1" rowspan="1" class="confluenceTd"><p>tapestry.web-app-folder</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>src/main/webapp</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The path to a web app</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>tapestry.servlet-container</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>jetty7</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the server container to use for the integration tests (jetty7 or tomcat6)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>tapestry.context-path</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The context path</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>tapestry.port</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>9090</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The web server port</p></td></tr><tr
 ><td colspan="1" rowspan="1" class="confluenceTd"><p>tapestry.ssl-port</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>8443</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The web server ssl port</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>tapestry.browser-start-command</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>*firefox</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The browser command to pass to Selenium</p></td></tr></tbody></table></div><p>Here's an example :</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>testng.xml</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;suite name=&quot;Selenium Tests Suite&quot; annotations=&quot;1.5&quot;&gt;
-  &lt;test name=&quot;Integration Tests&quot; enabled=&quot;true&quot;&gt;
-    &lt;parameter name=&quot;tapestry.browser-start-command&quot; value=&quot;*googlechrome&quot; /&gt;
-    &lt;parameter name=&quot;tapestry.port&quot; value=&quot;9091&quot; /&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;suite name="Selenium Tests Suite" annotations="1.5"&gt;
+  &lt;test name="Integration Tests" enabled="true"&gt;
+    &lt;parameter name="tapestry.browser-start-command" value="*googlechrome" /&gt;
+    &lt;parameter name="tapestry.port" value="9091" /&gt;
 
     &lt;classes&gt;
-      &lt;class name=&quot;com.example.newapp.SeleniumTest&quot;&gt;&lt;/class&gt;
+      &lt;class name="com.example.newapp.SeleniumTest"&gt;&lt;/class&gt;
     &lt;/classes&gt;
   &lt;/test&gt;
 &lt;/suite&gt;
-]]></script>
+</pre>
 </div></div><h1 id="IntegrationTesting-SomeInterestingTools">Some Interesting Tools</h1><p>Here are some interesting plugins you can use to write your integration tests.</p><ul><li>Google Chrome : <a shape="rect" class="external-link" href="https://chrome.google.com/webstore/detail/ikbfbhbdjpjnalaooidkdbgjknhghhbo" >xpathOnClick</a></li><li>FireFox : <a shape="rect" class="external-link" href="http://seleniumhq.org/projects/ide/" >Selenium IDE</a></li></ul></div>
 </div>
 

Modified: websites/production/tapestry/content/integration-with-existing-applications.html
==============================================================================
--- websites/production/tapestry/content/integration-with-existing-applications.html (original)
+++ websites/production/tapestry/content/integration-with-existing-applications.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,50 +67,34 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
+<div id="ConfluenceContent"><h2 id="Integrationwithexistingapplications-Integrationwithexistingapplications">Integration with existing applications</h2><p>You may have an existing JSP (or Struts, Spring MVC, etc.) application that you want to migrate to Tapestry. It's quite common to do this in stages, moving some functionality into Tapestry and leaving other parts, initially, in the other system. <a shape="rect" href="request-processing-faq.html">You may need to prevent Tapestry from handling certain requests</a>.</p><h3 id="Integrationwithexistingapplications-HowdoImakeaformonaJSPsubmitintoTapestry?">How do I make a form on a JSP submit into Tapestry?</h3><p>Tapestry's Form component does a lot of work while an HTML form is rendering to store all the information needed to handle the form submission in a later request; this is all very specific to Tapestry and the particular construction of your pages and forms; it can't be reproduced from a JSP.</p><p>Fortunately, that isn't neces
 sary: you can have a standard HTML Form submit to a Tapestry page, you just don't get to use all of Tapestry's built in conversion and validation logic.</p><p>All you need to know is how Tapestry converts page class names to page names (that appear in the URL). It's basically a matter of stripping off the <em>root-package</em>.<code>pages</code> prefix from the fully qualified class name. So, for example, if you are building a login screen as a JSP, you might want to have a Tapestry page to receive the user name and password. Let's assume the Tapestry page class is <code>com.example.myapp.pages.LoginForm</code>; the page name will be <code>loginform (although, since&#160;</code><span style="line-height: 1.4285715;">Tapestry is case insensitive, LoginForm would work just as well)</span><span style="line-height: 1.4285715;">, and the URL will be </span><code style="line-height: 1.4285715;">/loginform</code><span style="line-height: 1.4285715;">.</span></p><p>&#160;</p><div class="code
  panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: true; theme: Default" style="font-size:12px;">&lt;form method="post" action="/loginform"&gt;
 
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="security-faq.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="security-faq.html">Security FAQ</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="frequently-asked-questions.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="frequently-asked-questions.html">Frequently Asked Questions</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="request-processing-faq.html">Request Processing FAQ</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" h
 ref="request-processing-faq.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><h2 id="Integrationwithexistingapplications-Integrationwithexistingapplications">Integration with existing applications</h2><p>You may have an existing JSP (or Struts, Spring MVC, etc.) application that you want to migrate to Tapestry. It's quite common to do this in stages, moving some functionality into Tapestry and leaving other parts, initially, in the other system. <a shape="rect" href="request-processing-faq.html">You may need to prevent Tapestry from handling certain requests</a>.</p><h3 id="Integrationwithexistingapplications-HowdoImakeaformonaJSPsubmitintoTapestry?">How do I make a form on a JSP submit into Tapestry?</h3><p>Tapestry's Form component does a lot of work while an HTML form is rendering to store all the information needed to handle the form submission in a later request; this is a
 ll very specific to Tapestry and the particular construction of your pages and forms; it can't be reproduced from a JSP.</p><p>Fortunately, that isn't necessary: you can have a standard HTML Form submit to a Tapestry page, you just don't get to use all of Tapestry's built in conversion and validation logic.</p><p>All you need to know is how Tapestry converts page class names to page names (that appear in the URL). It's basically a matter of stripping off the <em>root-package</em>.<code>pages</code> prefix from the fully qualified class name. So, for example, if you are building a login screen as a JSP, you might want to have a Tapestry page to receive the user name and password. Let's assume the Tapestry page class is <code>com.example.myapp.pages.LoginForm</code>; the page name will be <code>loginform (although, since&#160;</code><span style="line-height: 1.4285715;">Tapestry is case insensitive, LoginForm would work just as well)</span><span style="line-height: 1.4285715;">, and t
 he URL will be </span><code style="line-height: 1.4285715;">/loginform</code><span style="line-height: 1.4285715;">.</span></p><p>&#160;</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: true; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;form method=&quot;post&quot; action=&quot;/loginform&quot;&gt;
-
-  &lt;input type=&quot;text&quot; value=&quot;userName&quot;/&gt;
+  &lt;input type="text" value="userName"/&gt;
   &lt;br/&gt;
-  &lt;input type=&quot;password&quot; value=&quot;password&quot;/&gt;
+  &lt;input type="password" value="password"/&gt;
   &lt;br/&gt;
-  &lt;input type=&quot;submit&quot; value=&quot;Login&quot;/&gt;
+  &lt;input type="submit" value="Login"/&gt;
 
 &lt;/form&gt;
-]]></script>
+</pre>
 </div></div><p>On the Tapestry side, we can expect that the LoginForm page will be activated; this means that its activate event handler will be invoked. We can leverage this, and Tapestry's RequestParameter annotation:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: true; theme: Default" type="syntaxhighlighter"><![CDATA[public class LoginForm
+<pre class="brush: java; gutter: true; theme: Default" style="font-size:12px;">public class LoginForm
 {
-  void onActivate(@RequestParameter(&quot;userName&quot;) String userName, @RequestParameter(&quot;password&quot;) String password)
+  void onActivate(@RequestParameter("userName") String userName, @RequestParameter("password") String password)
   {
      // Validate and store credentials, etc.
   }
 }
-]]></script>
+</pre>
 </div></div><p>The RequestParameter annotation extracts the named query parameter from the request, coerces its type from String to the parameter type (here, also String) and passes it into the method.</p><h3 id="Integrationwithexistingapplications-HowdoIshareinformationbetweenaJSPapplicationandtheTapestryapplication?">How do I share information between a JSP application and the Tapestry application?</h3><p>From the servlet container's point of view, there's no difference between a servlet, a JSP, and an entire Tapestry application. They all share the same ServletContext, and (once created), the same HttpSession.</p><p>On the Tapestry side, it is very easy to read and write session attributes:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: true; theme: Default" type="syntaxhighlighter"><![CDATA[public class ShowSearchResults
+<pre class="brush: java; gutter: true; theme: Default" style="font-size:12px;">public class ShowSearchResults
 {
   @SessionAttribute
   private SearchResults searchResults;
 }
-]]></script>
-</div></div><p>Reading the instance variable <code>searchResults</code> is instrumented to instead read the corresponding HttpSession attribute named "searchResults". You can also specify the <code>value</code> attribute of the SessionAttribute annotation to override the default attribute name.</p><p>Writing to the field causes the corresponding HttpSession attribute to be modified.</p><p>The session is automatically created as needed.</p><h3 id="Integrationwithexistingapplications-HowdoIputtheTapestryapplicationinsideafolder,toavoidconflicts?">How do I put the Tapestry application inside a folder, to avoid conflicts?</h3><p>Support for this was added in 5.3; see the notes on the <a shape="rect" href="configuration.html#Configuration-Configuration-SegregatingApplicationsIntoFolders">configuration page</a>.</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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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="security-faq.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="security-faq.html">Security FAQ</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="frequently-asked-questions.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="frequently-asked-questions.html">Frequently Asked Questions</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="request-processing-faq.html">Request Processing FAQ</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" h
 ref="request-processing-faq.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>&#160;</p><p>&#160;</p><p>&#160;</p></div>
+</pre>
+</div></div><p>Reading the instance variable <code>searchResults</code> is instrumented to instead read the corresponding HttpSession attribute named "searchResults". You can also specify the <code>value</code> attribute of the SessionAttribute annotation to override the default attribute name.</p><p>Writing to the field causes the corresponding HttpSession attribute to be modified.</p><p>The session is automatically created as needed.</p><h3 id="Integrationwithexistingapplications-HowdoIputtheTapestryapplicationinsideafolder,toavoidconflicts?">How do I put the Tapestry application inside a folder, to avoid conflicts?</h3><p>Support for this was added in 5.3; see the notes on the <a shape="rect" href="configuration.html">configuration page</a>.</p><p>&#160;</p><p>&#160;</p><p>&#160;</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/introduction.html
==============================================================================
--- websites/production/tapestry/content/introduction.html (original)
+++ websites/production/tapestry/content/introduction.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 

Modified: websites/production/tapestry/content/ioc-cookbook-basic-services-and-injection.html
==============================================================================
--- websites/production/tapestry/content/ioc-cookbook-basic-services-and-injection.html (original)
+++ websites/production/tapestry/content/ioc-cookbook-basic-services-and-injection.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,15 +67,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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="ScrollbarPrevName" width="33%">&#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-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="ioc-cookbook-overriding-ioc-services.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>
+<div id="ConfluenceContent">
 
 <p>The starting point for Tapestry IOC services and injection is knowing a few conventions: what to name your classes, what packages to put them in and so forth.</p>
 
@@ -88,20 +90,20 @@ table.ScrollbarTable td.ScrollbarNextIco
 <p>The PropertyAccess service is defined inside TapestryIOCModule's bind() method:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
   public static void bind(ServiceBinder binder)
   {
     . . .
     binder.bind(PropertyAccess.class, PropertyAccessImpl.class);
     binder.bind(ExceptionAnalyzer.class, ExceptionAnalyzerImpl.class);
     . . .
-  }]]></script>
+  }</pre>
 </div></div>
 
 <p>This example includes <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/ExceptionAnalyzer.html">ExceptionAnalyzer</a>, because it has a dependency on PropertyAccess:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 public class ExceptionAnalyzerImpl implements ExceptionAnalyzer
 {
     private final PropertyAccess propertyAccess;
@@ -111,7 +113,7 @@ public class ExceptionAnalyzerImpl imple
     }
 
     . . .
-}]]></script>
+}</pre>
 </div></div>
 
 <p>And that's the essence of Tapestry IoC right there; the bind() plus the constructor is <em>all</em> that's necessary.</p>
@@ -135,7 +137,7 @@ public class ExceptionAnalyzerImpl imple
 <p>Tapestry defines two such services, in the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/TapestryModule.html">TapestryModule</a>.</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
   @Marker(ClasspathProvider.class)
   public AssetFactory buildClasspathAssetFactory(ResourceCache resourceCache,
 
@@ -152,7 +154,7 @@ public class ExceptionAnalyzerImpl imple
   public AssetFactory buildContextAssetFactory(ApplicationGlobals globals)
   {
     return new ContextAssetFactory(request, globals.getContext());
-  }]]></script>
+  }</pre>
 </div></div>
 
 <p>Service builder methods are used here for two purposes: For the ClasspathAssetFactory, we are registering the new service as a listener of events from another service. For the ContextAssetFactory, we are extracting a value from an injected service and passing <em>that</em> to the constructor.</p>
@@ -164,7 +166,7 @@ public class ExceptionAnalyzerImpl imple
 <p>Here's an example. Again, we've jumped the gun with this <em>service contributor method</em> (we'll get into the why and how of these later), but you can see how Tapestry is figuring out which service to inject based on the presence of those annotations:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
   public void contributeAssetSource(MappedConfiguration&lt;String, AssetFactory&gt; configuration,
       @ContextProvider
       AssetFactory contextAssetFactory,
@@ -172,22 +174,13 @@ public class ExceptionAnalyzerImpl imple
       @ClasspathProvider
       AssetFactory classpathAssetFactory)
   {
-    configuration.add(&quot;context&quot;, contextAssetFactory);
-    configuration.add(&quot;classpath&quot;, classpathAssetFactory);
-  }]]></script>
+    configuration.add("context", contextAssetFactory);
+    configuration.add("classpath", classpathAssetFactory);
+  }</pre>
 </div></div>
 
 <p>This is far from the final word on injection and disambiguation; we'll be coming back to this concept repeatedly. And in later chapters of the cookbook, we'll also go into more detail about the many other concepts present in this example. The important part is that Tapestry <em>primarily</em> works off the parameter type (at the point of injection), but when that is insufficient (you'll know ... there will be an error) you can provide additional information, in the form of annotations, to straighten things out.</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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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="ScrollbarPrevName" width="33%">&#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-overriding-ioc-services.html">IoC Cookbook - Overriding IoC Services</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="ioc-cookbook-overriding-ioc-services.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></div>
+</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 Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,25 +67,17 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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 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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  @Contribute(ServiceOverride.class)
+<div id="ConfluenceContent"><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">defined 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-OverridingIoCSe
 rvices-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">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  @Contribute(ServiceOverride.class)
   public static void setupApplicationServiceOverrides(MappedConfiguration&lt;Class,Object&gt; configuration)
   {
     configuration.addInstance(SomeServiceType.class, SomeServiceTypeOverrideImpl.class);
   }
-]]></script>
+</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  public static void bind(ServiceBinder binder)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public static void bind(ServiceBinder binder)
   {
-    binder.bind(SomeServiceType.class, SomeServiceTypeOverrideImpl.class).withId(&quot;SomeServiceTypeOverride&quot;);
+    binder.bind(SomeServiceType.class, SomeServiceTypeOverrideImpl.class).withId("SomeServiceTypeOverride");
   }
 
   @Contribute(ServiceOverride.class)
@@ -83,22 +85,14 @@ table.ScrollbarTable td.ScrollbarNextIco
   {
     configuration.add(SomeServiceType.class, override);
   }
-]]></script>
+</pre>
 </div></div><p>Here we're defining a service using the module's <code>bind()</code> method.</p><p>Every service in the IoC container must have a unique id, that's why we used the <code>withId()</code> method; if we we hadn't, the default service id would have been "SomeServiceType" which is a likely conflict with the very service we're trying to override.</p><p>We can inject our overriding implementation of SomeServiceType using the special @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Local.html">Local</a> annotation, which indicates that a service within the same module only should be injected (that is, services of the indicated type in other modules are ignored). Without @Local, there would be a problem because the override parameter would need to be resolved using the MasterObjectProvider and, ultimately, the ServiceOverride service; this would cause Tapestry to throw an exception indicating that ServiceO
 verride depends on itself. We defuse that situation by using @Local, which prevents the MasterObjectProvider service from being used to resolve the override parameter.</p><h2 id="IoCCookbook-OverridingIoCServices-DecoratingServices">Decorating Services</h2><p>Another option is to <a shape="rect" href="tapestry-ioc-decorators.html">decorate</a> the existing service. Perhaps you want to extend some of the behavior of the service but keep the rest.</p><p>Alternately, this approach is useful to override a service that is matched using marker annotations.</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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  public SomeServiceType decorateSomeServiceType(final SomeServiceType delegate)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public SomeServiceType decorateSomeServiceType(final SomeServiceType delegate)
   {
     return new SomeServiceType() { . . . };
   }
-]]></script>
-</div></div><p>This decorate method is invoked because its name matches the service id of the original service, "SomeServiceType" (you have to adjust the name to match the service id).</p><p>The method is passed the original service and its job it to return an <em>interceptor</em>, an object that implements the same interface, wrapping around the original service. In many cases, your code will simply re-invoke methods on the delegate, passing the same parameters. However, an interceptor can decide to not invoke methods, or it can change parameters, or change return values, or catch or throw exceptions.</p><p>Note that the object passed in as <code>delegate</code> may be the core service implementation, or it may be some other interceptor from some other decorator for the same service.</p><hr><p>&#160;</p><p>&#160;</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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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></div>
+</pre>
+</div></div><p>This decorate method is invoked because its name matches the service id of the original service, "SomeServiceType" (you have to adjust the name to match the service id).</p><p>The method is passed the original service and its job it to return an <em>interceptor</em>, an object that implements the same interface, wrapping around the original service. In many cases, your code will simply re-invoke methods on the delegate, passing the same parameters. However, an interceptor can decide to not invoke methods, or it can change parameters, or change return values, or catch or throw exceptions.</p><p>Note that the object passed in as <code>delegate</code> may be the core service implementation, or it may be some other interceptor from some other decorator for the same service.</p><hr><p>&#160;</p><p>&#160;</p></div>
 </div>
 
 <div class="clearer"></div>

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 Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,47 +67,39 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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">
+<div id="ConfluenceContent"><h1 id="IoCCookbook-Patterns-UsingPatterns">Using Patterns</h1><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 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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public interface InjectionProvider
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public interface InjectionProvider
 {
   boolean provideInjection(String fieldName, Class fieldType, ObjectLocator locator,
       ClassTransformation transformation, MutableComponentModel componentModel);
-}]]></script>
+}</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public static void contributeInjectionProvider(
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public static void contributeInjectionProvider(
     OrderedConfiguration&lt;InjectionProvider&gt; configuration,
     MasterObjectProvider masterObjectProvider,
     ObjectLocator locator,
     SymbolSource symbolSource,
     AssetSource assetSource)
 {
-  configuration.add(&quot;Default&quot;, new DefaultInjectionProvider(masterObjectProvider, locator));
+  configuration.add("Default", new DefaultInjectionProvider(masterObjectProvider, locator));
 
-  configuration.add(&quot;ComponentResources&quot;, new ComponentResourcesInjectionProvider());
+  configuration.add("ComponentResources", new ComponentResourcesInjectionProvider());
 
-  configuration.add(&quot;CommonResources&quot;, new CommonResourcesInjectionProvider(), &quot;after:Default&quot;);
+  configuration.add("CommonResources", new CommonResourcesInjectionProvider(), "after:Default");
 
-  configuration.add(&quot;Asset&quot;, new AssetInjectionProvider(symbolSource, assetSource), before:Default&quot;);
+  configuration.add("Asset", new AssetInjectionProvider(symbolSource, assetSource), before:Default");
 
-  configuration.add(&quot;Block&quot;, new BlockInjectionProvider(), &quot;before:Default&quot;);
-  configuration.add(&quot;Service&quot;, new ServiceInjectionProvider(locator), &quot;after:*&quot;);
-}]]></script>
+  configuration.add("Block", new BlockInjectionProvider(), "before:Default");
+  configuration.add("Service", new ServiceInjectionProvider(locator), "after:*");
+}</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  public InjectionProvider build(List&lt;InjectionProvider&gt; configuration, ChainBuilder chainBuilder)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  public InjectionProvider build(List&lt;InjectionProvider&gt; configuration, ChainBuilder chainBuilder)
   {
     return chainBuilder.build(InjectionProvider.class, configuration);
-  }]]></script>
+  }</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class InjectWorker implements ComponentClassTransformWorker
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class InjectWorker implements ComponentClassTransformWorker
 {
   private final ObjectLocator locator;
 
@@ -140,16 +142,8 @@ table.ScrollbarTable td.ScrollbarNextIco
 
     }
   }
-}]]></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[*/
-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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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></div>
+}</pre>
+</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></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/ioc-cookbook-service-configurations.html
==============================================================================
--- websites/production/tapestry/content/ioc-cookbook-service-configurations.html (original)
+++ websites/production/tapestry/content/ioc-cookbook-service-configurations.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,15 +67,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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-patterns.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-patterns.html">IoC Cookbook - Patterns</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;</td></tr></table></div>
+<div id="ConfluenceContent">
 
 <h1 id="IoCcookbook-ServiceConfigurations-ServiceConfigurations">Service Configurations</h1>
 
@@ -90,12 +92,12 @@ table.ScrollbarTable td.ScrollbarNextIco
 <p>The Tapestry module makes a contribution into the service configuration:</p>
 
 <div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
   public static void contributeResourceDigestGenerator(Configuration&lt;String&gt; configuration)
   {
-    configuration.add(&quot;class&quot;);
-    configuration.add(&quot;tml&quot;);
-  }]]></script>
+    configuration.add("class");
+    configuration.add("tml");
+  }</pre>
 </div></div>
 
 <p>This is a <em>service contribution method</em>, a method that is invoked to provide values for a configuration. We'll see how the service receives these contributions shortly. The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/Configuration.html">Configuration</a> object is how values are added to the service's configuration. Other parameters to a service configuration method are injected much as with a service's constructor, or a service builder method.</p>
@@ -107,14 +109,14 @@ table.ScrollbarTable td.ScrollbarNextIco
 <p>Say your application stored a file on the classpath needed by your application; for illustrative purposes, perhaps it is a PGP private key. You don't want any client to able to download a .pgp file, no matter how unlikely that would be. Thus:</p>
 
 <div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 public class MyAppModule
 {
  public static void contributeResourceDigestGenerator(Configuration&lt;String&gt; configuration)
  {
-   configuration.add(&quot;pgp&quot;);
+   configuration.add("pgp");
  }
-}]]></script>
+}</pre>
 </div></div>
 
 <p>The contribution in MyAppModule doesn't <em>replace</em> the normal contribution, it is <em>combined</em>. The end result is that .class, .tml and .pgp files would <em>all</em> be protected.</p>
@@ -124,7 +126,7 @@ public class MyAppModule
 <p>A service receives the configuration as an injected parameter ... not of type Configuration (that's used for <em>making</em> contributions), but instead is of type Collection:</p>
 
 <div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 public class ResourceDigestGeneratorImpl implements ResourceDigestGenerator
 {
   private final Set&lt;String&gt; digestExtensions;
@@ -135,7 +137,7 @@ public class ResourceDigestGeneratorImpl
   }
 
   . . .
-}]]></script>
+}</pre>
 </div></div>
 
 <p>In many cases, the configuration is simply stored into an instance variable; in this example, the value is transformed from a Collection to a Set.</p>
@@ -151,25 +153,25 @@ public class ResourceDigestGeneratorImpl
 <p>Alternately, if the Request can't be handled, the Dispatcher returns false.</p>
 
 <div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 public void contributeMasterDispatcher(OrderedConfiguration&lt;Dispatcher&gt; configuration, . . .)
 {
   // Looks for the root path and renders the start page
 
-  configuration.add(&quot;RootPath&quot;, new RootPathDispatcher(. . .), &quot;before:Asset&quot;);
+  configuration.add("RootPath", new RootPathDispatcher(. . .), "before:Asset");
 
   // This goes first because an asset to be streamed may have an file extension, such as
-  // &quot;.html&quot;, that will confuse the later dispatchers.
+  // ".html", that will confuse the later dispatchers.
 
   configuration.add(
-          &quot;Asset&quot;,
+          "Asset",
           new AssetDispatcher(. . .),
-          &quot;before:PageRender&quot;);
+          "before:PageRender");
 
-  configuration.add(&quot;PageRender&quot;, new PageRenderDispatcher(. . .));
+  configuration.add("PageRender", new PageRenderDispatcher(. . .));
 
-  configuration.add(&quot;ComponentAction&quot;, new ComponentActionDispatcher(. . .), &quot;after:PageRender&quot;);
-}]]></script>
+  configuration.add("ComponentAction", new ComponentActionDispatcher(. . .), "after:PageRender");
+}</pre>
 </div></div>
 
 <p>With an <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/OrderedConfiguration.html">OrderedConfiguration</a>, each contribution gets a name, which must be unique. Here the names are RootPath, Asset, PageRender and ComponentAction.</p>
@@ -187,11 +189,11 @@ public void contributeMasterDispatcher(O
 <p>The MasterDispatcher service configuration defines a <a shape="rect" href="chainbuilder-service.html">Chain of Command</a> and we can provide the implementation using virtually no code:</p>
 
 <div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
   public static Dispatcher buildMasterDispatcher(List&lt;Dispatcher&gt; configuration, ChainBuilder chainBuilder)
   {
     return chainBuilder.build(Dispatcher.class, configuration);
-  }]]></script>
+  }</pre>
 </div></div>
 
 <p><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/ChainBuilder.html">ChainBuilder</a> is a service that <em>builds other services</em>. Here it creates an object of type Dispatcher in terms of the list of Dispatchers. This is one of the most common uses of service builder methods ... for when the service implementation doesn't exist, but can be constructed at runtime.</p>
@@ -205,36 +207,27 @@ public void contributeMasterDispatcher(O
 <p>The first step is to contribute values.</p>
 
 <div class="code panel pdl" style="border-style: solid;border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
   public static void contributeFactoryDefaults(MappedConfiguration&lt;String, String&gt; configuration)
   {
-    configuration.add(SymbolConstants.FILE_CHECK_INTERVAL, &quot;1000&quot;); // 1 second
-    configuration.add(SymbolConstants.FILE_CHECK_UPDATE_TIMEOUT, &quot;50&quot;); // 50 milliseconds
-    configuration.add(SymbolConstants.SUPPORTED_LOCALES, &quot;en&quot;);
-    configuration.add(&quot;tapestry.default-cookie-max-age&quot;, &quot;604800&quot;); // One week
-    configuration.add(&quot;tapestry.start-page-name&quot;, &quot;start&quot;);
-    configuration.add(&quot;tapestry.scriptaculous&quot;, &quot;classpath:${tapestry.scriptaculous.path}&quot;);
+    configuration.add(SymbolConstants.FILE_CHECK_INTERVAL, "1000"); // 1 second
+    configuration.add(SymbolConstants.FILE_CHECK_UPDATE_TIMEOUT, "50"); // 50 milliseconds
+    configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
+    configuration.add("tapestry.default-cookie-max-age", "604800"); // One week
+    configuration.add("tapestry.start-page-name", "start");
+    configuration.add("tapestry.scriptaculous", "classpath:${tapestry.scriptaculous.path}");
     configuration.add(
-            &quot;tapestry.scriptaculous.path&quot;,
-            &quot;org/apache/tapestry5/scriptaculous_1_7_1_beta_3&quot;);
-    configuration.add(&quot;tapestry.jscalendar.path&quot;, &quot;org/apache/tapestry5/jscalendar-1.0&quot;);
-    configuration.add(&quot;tapestry.jscalendar&quot;, &quot;classpath:${tapestry.jscalendar.path}&quot;);
-  }]]></script>
+            "tapestry.scriptaculous.path",
+            "org/apache/tapestry5/scriptaculous_1_7_1_beta_3");
+    configuration.add("tapestry.jscalendar.path", "org/apache/tapestry5/jscalendar-1.0");
+    configuration.add("tapestry.jscalendar", "classpath:${tapestry.jscalendar.path}");
+  }</pre>
 </div></div>
 
 <p>These contribution set up a number of defaults used to configure various Tapestry services. As you can see, you can even define symbol values in terms of other symbol values.</p>
 
 <p>Mapped configurations don't have to be keyed on Strings (enums or Class are other common key types). When a mapped configuration <em>is</em> keyed on String, then a case-insensitive map is used.</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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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-patterns.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-patterns.html">IoC Cookbook - Patterns</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;</td></tr></table></div></div>
+</div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/ioc-cookbook.html
==============================================================================
--- websites/production/tapestry/content/ioc-cookbook.html (original)
+++ websites/production/tapestry/content/ioc-cookbook.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,15 +67,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-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><h1 id="IoCcookbook-TapestryIoCCookbook">Tapestry IoC Cookbook</h1><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
+<div id="ConfluenceContent"><h1 id="IoCcookbook-TapestryIoCCookbook">Tapestry IoC Cookbook</h1><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 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>
 

Modified: websites/production/tapestry/content/ioc.html
==============================================================================
--- websites/production/tapestry/content/ioc.html (original)
+++ websites/production/tapestry/content/ioc.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 

Modified: websites/production/tapestry/content/javascript-faq.html
==============================================================================
--- websites/production/tapestry/content/javascript-faq.html (original)
+++ websites/production/tapestry/content/javascript-faq.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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 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();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -57,15 +67,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><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;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
-
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="component-events-faq.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="component-events-faq.html">Component Events FAQ</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="frequently-asked-questions.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="frequently-asked-questions.html">Frequently Asked Questions</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="ajax-components-faq.html">Ajax Components FAQ</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"
 ><a shape="rect" href="ajax-components-faq.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><h2 id="JavaScriptFAQ-JavaScript">JavaScript</h2><p>Main article: <a shape="rect" href="legacy-javascript.html">Legacy JavaScript</a></p><h3 id="JavaScriptFAQ-WhydoIgeta&quot;Tapestryisundefined&quot;erroronformsubmit?(5.3andearlier)">Why do I get a "Tapestry is undefined" error on form submit? (5.3 and earlier)</h3><p>This client-side error is clear but can be awkward to solve. It means your browser has not been able to load the tapestry.js file properly. The question is, why? It can be due to multiple reasons, some of them below:</p><ul><li>First, check if 'tapestry.js' is present in the head part of your resulting HTML page.</li><li><p>If you have set the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html#CO
 MBINE_SCRIPTS">tapestry.combine-scripts</a> configuration symbol to true, Tapestry generates one single URL to retrieve all the JS files. Sometimes, this can produce long URLs that browsers are unable to retrieve. Try setting the symbol to false.</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>This only applies to Tapestry 5.1.</p></div></div></li><li>If you have included jQuery in conjunction with Tapestry's prototype, that will cause a conflict with the '$' selector used by both. In this case, you should put jQuery on top of the stack and turn on the <a shape="rect" class="external-link" href="http://api.jquery.com/jQuery.noConflict/" >jQuery.noConflict</a> mode.</li><li>Also, if you have included a custom or third-party JS library on top of the stack that causes the JavaScript parsing to fail, then che
 ck the JavaScript syntax in that library.</li><li>If you have used a tool to minimize your JavaScript libraries, this can lead to JavaScript syntax errors, so check if it works with all the JavaScript files unpacked.</li></ul><h3 id="JavaScriptFAQ-What'sthedifferencebetweentheT5objectandtheTapestryobjectinthebrowser?(5.3andearlier)">What's the difference between the <code>T5</code> object and the <code>Tapestry</code> object in the browser? (5.3 and earlier)</h3><p>Both of these objects are <em>namespaces</em>: containers of functions, constants, and nested namespaces.</p><p>The <code>T5</code> object is a replacement for the <code>Tapestry</code> object, starting in release 5.3. Increasingly, functions defined by the <code>Tapestry</code> object are being replaced with similar or equivalent functions in the <code>T5</code> object.</p><p>This is part of an overall goal, spanning at least two releases of Tapestry, to make Tapestry JavaScript framework agnostic; which is to say, not d
 epend specifically on Prototype or jQuery. Much of the code in the <code>Tapestry</code> object is specifically linked to Prototype and Scriptaculous.</p><p>The <code>T5</code> object represents a stable, documented, set of APIs that are preferred when building components for maximum portability between underlying JavaScript frameworks. In other words, when building component libraries, coding to the <code>T5</code> object ensures that your component will be useful regardless of whether the final application is built using Prototype, jQuery or something else.</p></div>
+<div id="ConfluenceContent"><h2 id="JavaScriptFAQ-JavaScript">JavaScript</h2><p>Main article: <a shape="rect" href="legacy-javascript.html">Legacy JavaScript</a></p><h3 id="JavaScriptFAQ-WhydoIgeta&quot;Tapestryisundefined&quot;erroronformsubmit?(5.3andearlier)">Why do I get a "Tapestry is undefined" error on form submit? (5.3 and earlier)</h3><p>This client-side error is clear but can be awkward to solve. It means your browser has not been able to load the tapestry.js file properly. The question is, why? It can be due to multiple reasons, some of them below:</p><ul><li>First, check if 'tapestry.js' is present in the head part of your resulting HTML page.</li><li><p>If you have set the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html#COMBINE_SCRIPTS">tapestry.combine-scripts</a> configuration symbol to true, Tapestry generates one single URL to retrieve all the JS files. Sometimes, this can produce long 
 URLs that browsers are unable to retrieve. Try setting the symbol to false.</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>This only applies to Tapestry 5.1.</p></div></div></li><li>If you have included jQuery in conjunction with Tapestry's prototype, that will cause a conflict with the '$' selector used by both. In this case, you should put jQuery on top of the stack and turn on the <a shape="rect" class="external-link" href="http://api.jquery.com/jQuery.noConflict/" >jQuery.noConflict</a> mode.</li><li>Also, if you have included a custom or third-party JS library on top of the stack that causes the JavaScript parsing to fail, then check the JavaScript syntax in that library.</li><li>If you have used a tool to minimize your JavaScript libraries, this can lead to JavaScript syntax errors, so check if it 
 works with all the JavaScript files unpacked.</li></ul><h3 id="JavaScriptFAQ-What'sthedifferencebetweentheT5objectandtheTapestryobjectinthebrowser?(5.3andearlier)">What's the difference between the <code>T5</code> object and the <code>Tapestry</code> object in the browser? (5.3 and earlier)</h3><p>Both of these objects are <em>namespaces</em>: containers of functions, constants, and nested namespaces.</p><p>The <code>T5</code> object is a replacement for the <code>Tapestry</code> object, starting in release 5.3. Increasingly, functions defined by the <code>Tapestry</code> object are being replaced with similar or equivalent functions in the <code>T5</code> object.</p><p>This is part of an overall goal, spanning at least two releases of Tapestry, to make Tapestry JavaScript framework agnostic; which is to say, not depend specifically on Prototype or jQuery. Much of the code in the <code>Tapestry</code> object is specifically linked to Prototype and Scriptaculous.</p><p>The <code>T5</
 code> object represents a stable, documented, set of APIs that are preferred when building components for maximum portability between underlying JavaScript frameworks. In other words, when building component libraries, coding to the <code>T5</code> object ensures that your component will be useful regardless of whether the final application is built using Prototype, jQuery or something else.</p></div>
 </div>
 
 <div class="clearer"></div>