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 2013/09/23 00:21:27 UTC

svn commit: r879492 [16/30] - in /websites/production/tapestry/content: ./ 2009/ 2009/09/ 2009/09/13/ 2009/10/ 2009/10/27/ 2009/11/ 2009/11/25/ 2010/ 2010/07/ 2010/07/18/ 2010/07/24/ 2010/10/ 2010/10/11/ 2010/10/31/ 2010/11/ 2010/11/18/ 2010/11/19/ 201...

Modified: websites/production/tapestry/content/injection-in-detail.html
==============================================================================
--- websites/production/tapestry/content/injection-in-detail.html (original)
+++ websites/production/tapestry/content/injection-in-detail.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,18 @@
     Injection in Detail -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +45,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -64,7 +75,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="strategybuilder-service.html"><img align="middle" border="0" src="/images/confluence/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="strategybuilder-service.html">StrategyBuilder Service</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc.html"><img align="middle" border="0" src="/images/confluence/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="ioc.html">IoC</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="object-providers.html">Object Providers</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="object-providers.html"><img align="middle" border="0" src="/images/confluence/forwd_16.gif" width="16" 
 height="16"></a></td></tr></table></div>
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="strategybuilder-service.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="strategybuilder-service.html">StrategyBuilder Service</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc.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.html">IoC</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="object-providers.html">Object Providers</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="object-providers.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><a shape="rect" name="InjectioninDetail-InjectioninDetail"></a>Injection in Detail</h1>
 
@@ -128,7 +139,7 @@ table.ScrollbarTable td.ScrollbarNextIco
 <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline">
 If field type does not match any of the available resource types, or the Inject annotation is present, logic continues to the next step.
 <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline">
-<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Injection of resources into fields is triggered by the presence of the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectResource.html">InjectResource</a> annotation, whereas injection of resources into parameters occurs when the Inject or InjectService annotation is <em>not</em> present. These rules are slightly tricky, which reflects a desire to avoid any annotations except when needed, and the fact that field injection came much later than parameter injection.</td></tr></table></div></li></ul>
+<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Injection of resources into fields is triggered by the presence of the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectResource.html">InjectResource</a> annotation, whereas injection of resources into parameters occurs when the Inject or InjectService annotation is <em>not</em> present. These rules are slightly tricky, which reflects a desire to avoid any annotations except when needed, and the fact that field injection came much later than parameter injection.</td></tr></table></div></li></ul>
 
 
 <h2><a shape="rect" name="InjectioninDetail-ServiceLookupbyTypeandAnnotations"></a>Service Lookup by Type and Annotations</h2>
@@ -154,7 +165,7 @@ If field type does not match any of the 
 
 <p>As a chain-of-command, each of the following ObjectProviders will be considered and will attempt to identify the object to be injected.</p>
 
-<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">A common problem when extending injection is that contributions into the MasterObjectProvider configuration have to be handled carefully. Any dependencies of the contributed objects should be resolvable using the early stages of the injection process, otherwise MasterObjectProvider will have to be instantiated in order to handle its own injection: Tapestry will detect this impossibility and throw an exception. In addition, the <a shape="rect" href="typecoercer-service.html" title="TypeCoercer Service">TypeCoercer</a> service is used by several ObjectProvider implementations, so the same restrictions apply to TypeCoercer service contributions.</td></tr></table></div>
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">A common problem when extending injection is that contributions into the MasterObjectProvider configuration have to be handled carefully. Any dependencies of the contributed objects should be resolvable using the early stages of the injection process, otherwise MasterObjectProvider will have to be instantiated in order to handle its own injection: Tapestry will detect this impossibility and throw an exception. In addition, the <a shape="rect" href="typecoercer-service.html" title="TypeCoercer Service">TypeCoercer</a> service is used by several ObjectProvider implementations, so the same restrictions apply to TypeCoercer service contributions.</td></tr></t
 able></div>
 
 <h3><a shape="rect" name="InjectioninDetail-ValueObjectProvider"></a>Value ObjectProvider</h3>
 
@@ -176,7 +187,7 @@ If field type does not match any of the 
 
 <p>Uses the Alias service (<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/Alias.html">API</a>) to look for an object that can be injected.</p>
 
-<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Deprecated in Tapestry 5.2.</td></tr></table></div>
+<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Deprecated in Tapestry 5.2.</td></tr></table></div>
 
 <p>This is commonly used to override a built-in service by contributing an object with the exact same interface. This is an older and more complex version of the ServiceOverride provider.</p>
 
@@ -192,7 +203,7 @@ If field type does not match any of the 
 
 <p>Looks for the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Service.html">Service</a> annotation; if present, the annotation's value is the exact service id to inject. This is necessary because injections into <em>component</em> fields are always triggered by the Inject annotation.</p>
 
-<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">This is supported but no longer necessary, as the @InjectService annotation is now also supported for component fields.</td></tr></table></div>
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">This is supported but no longer necessary, as the @InjectService annotation is now also supported for component fields.</td></tr></table></div>
 
 <h3><a shape="rect" name="InjectioninDetail-SpringBeanObjectProvider%28tapestryspring%29"></a>SpringBean ObjectProvider (tapestry-spring)</h3>
 
@@ -217,16 +228,16 @@ If field type does not match any of the 
 <p>Often this is used to perform additional setup, such as registerring a service as a listener of events produced by another service:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> class MyServiceImpl <span class="code-keyword">implements</span> MyService, UpdateListener
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public class MyServiceImpl implements MyService, UpdateListener
 {
   @PostInjection
-  <span class="code-keyword">public</span> void registerAsListener(UpdateListenerHub hub)
+  public void registerAsListener(UpdateListenerHub hub)
   {
-    hub.addUpdateListener(<span class="code-keyword">this</span>);
+    hub.addUpdateListener(this);
   }
 }
-</pre>
+]]></script>
 </div></div>
 
 <h1><a shape="rect" name="InjectioninDetail-ComponentInjection"></a>Component Injection</h1>
@@ -258,7 +269,7 @@ If field type does not match any of the 
 
 
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.3</b><br clear="none"></td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.3</b><br clear="none"></td></tr></table></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
 <p>ComponentResourceSelector is new as of release 5.3. It encapsulates a locale plus additional application-specific data used for skinning and/or themeing.</p>
 </div>
@@ -283,12 +294,12 @@ 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="strategybuilder-service.html"><img align="middle" border="0" src="/images/confluence/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="strategybuilder-service.html">StrategyBuilder Service</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc.html"><img align="middle" border="0" src="/images/confluence/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="ioc.html">IoC</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="object-providers.html">Object Providers</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="object-providers.html"><img align="middle" border="0" src="/images/confluence/forwd_16.gif" width="16" 
 height="16"></a></td></tr></table></div></div>
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="strategybuilder-service.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="strategybuilder-service.html">StrategyBuilder Service</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc.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.html">IoC</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="object-providers.html">Object Providers</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="object-providers.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 class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -299,7 +310,7 @@ table.ScrollbarTable td.ScrollbarNextIco
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/injection-in-detail.html" async="true">

Modified: websites/production/tapestry/content/injection.html
==============================================================================
--- websites/production/tapestry/content/injection.html (original)
+++ websites/production/tapestry/content/injection.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,18 @@
     Injection -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +45,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -103,20 +114,20 @@
 <p>For field type <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Block.html">Block</a>, the value of the Inject annotation is the id of the <a shape="rect" href="component-templates.html#ComponentTemplates-block">&lt;t:block&gt;</a> element within the component's template. Normally, the id of the block is determined from the field name (after stripping out any leading "_" and "$" characters):</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 @Inject
-<span class="code-keyword">private</span> Block foo;
-</pre>
+private Block foo;
+]]></script>
 </div></div>
 
 <p>Where that is not appropriate, an @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Id.html">Id</a> annotation can be supplied:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 @Inject
-@Id(<span class="code-quote">"bar"</span>)
-<span class="code-keyword">private</span> Block barBlock;
-</pre>
+@Id("bar")
+private Block barBlock;
+]]></script>
 </div></div>
 
 <p>The first injection will inject the Block with id "foo" (as always, case is ignored). The second injection will inject the Block with id "bar".</p>
@@ -128,10 +139,10 @@
 <p>A very common example occurs when a component needs access to its <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ComponentResources.html">resources</a>. The component can define a field of the appropriate type and use the <tt>@Inject</tt> annotation without a value:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 @Inject
-<span class="code-keyword">private</span> ComponentResources resources;
-</pre>
+private ComponentResources resources;
+]]></script>
 </div></div>
 
 <p>Tapestry uses the type of the field, ComponentResources, to determine what to inject into this field.</p>
@@ -160,11 +171,11 @@
 <p>When the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Path.html">Path</a> annotation is also present, then the injected value (relative to the component) will be a localized asset.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 @Inject
-@Path(<span class="code-quote">"context:images/top_banner.png"</span>)
-<span class="code-keyword">private</span> Asset banner;
-</pre>
+@Path("context:images/top_banner.png")
+private Asset banner;
+]]></script>
 </div></div>
 
 <p>Symbols in the annotation value are expanded.</p>
@@ -174,10 +185,10 @@
 <p>Here, a custom EmployeeService service is injected, but any custom or built-in service may be injected in the same way. </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 @Inject
-<span class="code-keyword">private</span> EmployeeService employeeService;
-</pre>
+private EmployeeService employeeService;
+]]></script>
 </div></div>
 
 <p>A large number of services are provided by Tapestry. See the following packages:</p>
@@ -193,18 +204,18 @@
 
 <div class="navmenu" style="float:left; background:white; margin:3px; padding:3px"><ul><li><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/package-summary.html">Tapestry IOC Services</a></li><li><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/cron/package-summary.html">Tapestry IOC Cron Services</a></li><li><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/kaptcha/services/package-summary.html">Kaptcha Services</a></li><li><a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/upload/services/package-summary.html">File Upload Services</a></li></ul>
 </div>
-<div style="clear:both"></div>
+<p></p><div style="clear:both"></div>
 
 <h3><a shape="rect" name="Injection-ExplicitServiceInjection"></a>Explicit Service Injection</h3>
 
 <p>Here, a specific object is requested. A @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Service.html">Service</a> annotation is used to identify the service name.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 @Inject
-@Service(<span class="code-quote">"Request"</span>)
-<span class="code-keyword">private</span> Request request;
-</pre>
+@Service("Request")
+private Request request;
+]]></script>
 </div></div>
 
 <p>This is generally not necessary; you should always be able to identify the service to be injected just by type, not by explicit id. Explicit ids have the disadvantage of not being refactoring-safe: this won't happen with the Request service, but perhaps in your own code ... if you rename the service interface and rename the service id to match, your existing injections using the explicit service id will break.</p>
@@ -225,7 +236,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -236,7 +247,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/injection.html" async="true">

Modified: websites/production/tapestry/content/input-validation.html
==============================================================================
--- websites/production/tapestry/content/input-validation.html (original)
+++ websites/production/tapestry/content/input-validation.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,10 @@
     Input Validation -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +37,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -61,7 +64,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -72,7 +75,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/input-validation.html" async="true">

Modified: websites/production/tapestry/content/integrating-with-jpa.html
==============================================================================
--- websites/production/tapestry/content/integrating-with-jpa.html (original)
+++ websites/production/tapestry/content/integrating-with-jpa.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,19 @@
     Integrating with JPA -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.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"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +46,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -58,7 +70,7 @@
 <div id="content">
 <div id="ConfluenceContent">
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.3</b><br clear="none"></td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.3</b><br clear="none"></td></tr></table></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"></div>
 
 <p>Starting with Tapestry 5.3, Tapestry provides built-in integration with the Java Persistence API (JPA). This module supersedes <a shape="rect" class="external-link" href="http://tynamo.org/tapestry-jpa+guide" >Tynamo's JPA integration</a>.</p>
@@ -72,33 +84,33 @@
 <p>The persistence.xml file is the standard configuration file in JPA used to define the persistence units. Tapestry reads this file to create the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityManagerFactory.html" >EntityManagerFactory</a>. The following example demonstrates a persistence.xml file.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
-<span class="code-tag">&lt;persistence xmlns=<span class="code-quote">"http://java.sun.com/xml/ns/persistence"</span> version=<span class="code-quote">"2.0"</span>&gt;</span>
-   <span class="code-tag">&lt;persistence-unit name=<span class="code-quote">"DemoUnit"</span> transaction-type=<span class="code-quote">"RESOURCE_LOCAL"</span>&gt;</span>
-       <span class="code-tag">&lt;properties&gt;</span>
-          <span class="code-tag">&lt;property name=<span class="code-quote">"javax.persistence.jdbc.driver"</span> value=<span class="code-quote">"org.h2.Driver"</span> /&gt;</span>
-          <span class="code-tag">&lt;property name=<span class="code-quote">"javax.persistence.jdbc.url"</span>    value=<span class="code-quote">"jdbc:h2:mem:test"</span> /&gt;</span>
-          <span class="code-tag">&lt;property name=<span class="code-quote">"javax.persistence.jdbc.user"</span>   value=<span class="code-quote">"sa"</span> /&gt;</span>
-          <span class="code-tag">&lt;property name=<span class="code-quote">"eclipselink.ddl-generation"</span>    value=<span class="code-quote">"create-tables"</span>/&gt;</span>
-          <span class="code-tag">&lt;property name=<span class="code-quote">"eclipselink.logging.level"</span>     value=<span class="code-quote">"fine"</span>/&gt;</span>
-      <span class="code-tag">&lt;/properties&gt;</span>
-   <span class="code-tag">&lt;/persistence-unit&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0"&gt;
+   &lt;persistence-unit name="DemoUnit" transaction-type="RESOURCE_LOCAL"&gt;
+       &lt;properties&gt;
+          &lt;property name="javax.persistence.jdbc.driver" value="org.h2.Driver" /&gt;
+          &lt;property name="javax.persistence.jdbc.url"    value="jdbc:h2:mem:test" /&gt;
+          &lt;property name="javax.persistence.jdbc.user"   value="sa" /&gt;
+          &lt;property name="eclipselink.ddl-generation"    value="create-tables"/&gt;
+          &lt;property name="eclipselink.logging.level"     value="fine"/&gt;
+      &lt;/properties&gt;
+   &lt;/persistence-unit&gt;
 
-<span class="code-tag">&lt;/persistence&gt;</span></pre>
+&lt;/persistence&gt;]]></script>
 </div></div>
 
 <p>By default, the persistence descriptor is named <em>persistence.xml</em> and is expected to be located on the classpath in the <em>META-INF</em> directory. If you want to place the <em>persistence.xml</em> file in another directory or name it differently, you can make a contribution to the <em>SymbolProvider</em> service, as shown in the following example. This is a quite useful feature if you want to use a different persistence descriptor for tests.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class AppModule {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class AppModule {
 
     @Contribute(SymbolProvider.class)
     @FactoryDefaults
-    <span class="code-keyword">public</span> <span class="code-keyword">static</span> void provideFactoryDefaults(<span class="code-keyword">final</span> MappedConfiguration&lt;<span class="code-object">String</span>, <span class="code-object">String</span>&gt; configuration) {
-        configuration.add(JpaSymbols.PERSISTENCE_DESCRIPTOR, <span class="code-quote">"/org/example/persistence.xml"</span>);
+    public static void provideFactoryDefaults(final MappedConfiguration&lt;String, String&gt; configuration) {
+        configuration.add(JpaSymbols.PERSISTENCE_DESCRIPTOR, "/org/example/persistence.xml");
     }
 
-}</pre>
+}]]></script>
 </div></div>
 
 <h2><a shape="rect" name="IntegratingwithJPA-XMLlessJPAconfiguration"></a>XML-less JPA configuration</h2>
@@ -106,52 +118,52 @@
 <p>With Tapestry, configuring JPA is much simpler than as described in the JPA specification. Tapestry allows you to configure the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityManagerFactory.html" >EntityManagerFactory</a> programmatically, without writing any XML. Imagine you want to use JDBC connections managed by the container and provided through JNDI. The resulting persistence descriptor might look like this:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
-&lt;persistence xmlns=<span class="code-quote">"http://java.sun.com/xml/ns/persistence"</span>
-             version=<span class="code-quote">"2.0"</span>&gt;
-   <span class="code-tag">&lt;persistence-unit name=<span class="code-quote">"JTAUnit"</span> transaction-type=<span class="code-quote">"RESOURCE_LOCAL"</span>&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
+             version="2.0"&gt;
+   &lt;persistence-unit name="JTAUnit" transaction-type="RESOURCE_LOCAL"&gt;
 
-      <span class="code-tag">&lt;non-jta-data-source&gt;</span>
+      &lt;non-jta-data-source&gt;
          jdbc/JPATest
-      <span class="code-tag">&lt;/non-jta-data-source&gt;</span>
+      &lt;/non-jta-data-source&gt;
 
-      <span class="code-tag">&lt;properties&gt;</span>
-         <span class="code-tag">&lt;property name=<span class="code-quote">"eclipselink.ddl-generation"</span> value=<span class="code-quote">"create-tables"</span>/&gt;</span>
-         <span class="code-tag">&lt;property name=<span class="code-quote">"eclipselink.logging.level"</span> value=<span class="code-quote">"fine"</span>/&gt;</span>
-      <span class="code-tag">&lt;/properties&gt;</span>
-   <span class="code-tag">&lt;/persistence-unit&gt;</span>
+      &lt;properties&gt;
+         &lt;property name="eclipselink.ddl-generation" value="create-tables"/&gt;
+         &lt;property name="eclipselink.logging.level" value="fine"/&gt;
+      &lt;/properties&gt;
+   &lt;/persistence-unit&gt;
 
-<span class="code-tag">&lt;/persistence&gt;</span></pre>
+&lt;/persistence&gt;]]></script>
 </div></div>
 
 <p>Now let's see how to provide the same configuration <em>without</em> XML. The following demonstrates an equivalent JPA configuration.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class AppModule {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class AppModule {
 
    @Contribute(EntityManagerSource.class)
-   <span class="code-keyword">public</span> <span class="code-keyword">static</span> void configurePersistenceUnitInfos(MappedConfiguration&lt;<span class="code-object">String</span>,PersistenceUnitConfigurer&gt; cfg) {
+   public static void configurePersistenceUnitInfos(MappedConfiguration&lt;String,PersistenceUnitConfigurer&gt; cfg) {
 
-      PersistenceUnitConfigurer configurer = <span class="code-keyword">new</span> PersistenceUnitConfigurer() {
+      PersistenceUnitConfigurer configurer = new PersistenceUnitConfigurer() {
 
-         <span class="code-keyword">public</span> void configure(TapestryPersistenceUnitInfo unitInfo) {
+         public void configure(TapestryPersistenceUnitInfo unitInfo) {
 
-            unitInfo.nonJtaDataSource(<span class="code-quote">"jdbc/JPATest"</span>)
-               .addProperty(<span class="code-quote">"eclipselink.ddl-generation"</span>, <span class="code-quote">"create-tables"</span>)
-               .addProperty(<span class="code-quote">"eclipselink.logging.level"</span>, <span class="code-quote">"fine"</span>);
+            unitInfo.nonJtaDataSource("jdbc/JPATest")
+               .addProperty("eclipselink.ddl-generation", "create-tables")
+               .addProperty("eclipselink.logging.level", "fine");
          }
      };
 
-     cfg.add(<span class="code-quote">"JTAUnit"</span>, configurer);
+     cfg.add("JTAUnit", configurer);
    }
-}</pre>
+}]]></script>
 </div></div>
 
 <p>In the example above you can see a contribution to the <em>EntityManagerSource</em> service. This service is responsible for creating the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityManagerFactory.html" >EntityManagerFactory</a> to be used to create <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityManager.html" >EntityManager</a>. When the service is initialized, it parses the <em>persistence.xml</em> file, if available. For any persistence unit defined in the XML descriptor a <em>TapestryPersistenceUnitInfo</em> object is created. The <em>TapestryPersistenceUnitInfo</em> interface is a mutable extension of the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/spi/PersistenceUnitInfo.html" >PersistenceUnitInfo</a> interface (defined in the JPA specification) that allows you to configure a persistence unit pr
 ogrammatically.</p>
 
 <p>After parsing the persistence descriptor, the EntityManagerSource service applies its configuration to create further persistence units and/or update the existing ones. The service&#8217;s configuration is a map in which persistence unit names are associated with <em>PersistenceUnitConfigurer</em> instances. A PersistenceUnitConfigurer is used to configure a persistence unit programmatically that has been associated with it. In the example above you can see a contribution providing a PersistenceUnitConfigurer for the unit named <em>JTAUnit</em>.</p>
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Note that the TapestryPersistenceUnitInfo instance passed to the PersistenceUnitConfigurer is either empty or my contain the persistence unit metadata read from the persistence.xml file. What happens if you contribute a PersistenceUnitConfigurer for a persistence unit that has not been defined in the persistence.xml file? In this case Tapestry assumes that you want to configure the persistence unit programmatically and just creates a fresh <em>TapestryPersistenceUnitInfo</em> object and passes it to the <em>PersistenceUnitConfigurer</em>.</td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Note that the TapestryPersistenceUnitInfo instance passed to the PersistenceUnitConfigurer is either empty or my contain the persistence unit metadata read from the persistence.xml file. What happens if you contribute a PersistenceUnitConfigurer for a persistence unit that has not been defined in the persistence.xml file? In this case Tapestry assumes that you want to configure the persistence unit programmatically and just creates a fresh <em>TapestryPersistenceUnitInfo</em> object and passes it to the <em>PersistenceUnitConfigurer</em>.</td></tr></table></div>
 
 <h2><a shape="rect" name="IntegratingwithJPA-Automaticallyaddingmanagedclasses"></a>Automatically adding managed classes </h2>
 
@@ -160,15 +172,15 @@
 <p>If you have additional packages containing entities, you may contribute them to the <em>JpaEntityPackageManager</em> service configuration.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class AppModule {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class AppModule {
 
    @Contribute(JpaEntityPackageManager.class)
-   <span class="code-keyword">public</span> <span class="code-keyword">static</span> void providePackages(Configuration&lt;<span class="code-object">String</span>&gt; configuration) {
+   public static void providePackages(Configuration&lt;String&gt; configuration) {
 
-      configuration.add(<span class="code-quote">"org.example.myapp.domain"</span>);
-      configuration.add(<span class="code-quote">"com.acme.model"</span>);
+      configuration.add("org.example.myapp.domain");
+      configuration.add("com.acme.model");
    }
-}</pre>
+}]]></script>
 </div></div>
 <p>As you can see, you may add as many packages as you wish.</p>
 
@@ -181,56 +193,56 @@
 <p>Depending on whether more than one persistence unit has been defined, the way to inject <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityManager.html" >EntityManager</a> varies slightly. Let&#8217;s start with a simple scenario, where only a single persistence unit is defined. In this case, an EntityManager can be injected using the @Inject annotation.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class CreateAddress {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class CreateAddress {
 
    @Inject
-   <span class="code-keyword">private</span> EntityManager entityManager;
+   private EntityManager entityManager;
 
    @Property
-   <span class="code-keyword">private</span> Address address;
+   private Address address;
 
    @CommitAfter
    void onSuccess() {
       entityManager.persist(address);
    }
-}</pre>
+}]]></script>
 </div></div>
 
 <p>Alternatively, you can use the @<a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/PersistenceContext.html" >PersistenceContext</a> annotation to get the EntityManager injected into a page or component, as shown in the following example.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class CreateAddress {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class CreateAddress {
 
    @PersistenceContext
-   <span class="code-keyword">private</span> EntityManager entityManager;
+   private EntityManager entityManager;
 
    @Property
-   <span class="code-keyword">private</span> Address address;
+   private Address address;
 
    @CommitAfter
    void onSuccess() {
       entityManager.persist(address);
    }
-}</pre>
+}]]></script>
 </div></div>
 
 <p>If you have multiple instances of persistence-unit defined in the same application, you need to explicitly tell Tapestry which persistence unit you want to get injected. This is what the @PersistenceContext annotation&#8217;s <em>name</em> attribute is used for?  The following example demonstrates how to inject the persistence unit named <em>DemoUnit</em>. </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class CreateAddress {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class CreateAddress {
 
-   @PersistenceContext(unitName = <span class="code-quote">"DemoUnit"</span>)
-   <span class="code-keyword">private</span> EntityManager entityManager;
+   @PersistenceContext(unitName = "DemoUnit")
+   private EntityManager entityManager;
 
    @Property
-   <span class="code-keyword">private</span> Address address;
+   private Address address;
 
    @CommitAfter
-   @PersistenceContext(unitName = <span class="code-quote">"DemoUnit"</span>)
+   @PersistenceContext(unitName = "DemoUnit")
    void onSuccess() {
       entityManager.persist(address);
    }
-}</pre>
+}]]></script>
 </div></div>
 
 <h2><a shape="rect" name="IntegratingwithJPA-InjectingEntityManagerintoservices"></a>Injecting EntityManager into services</h2>
@@ -238,39 +250,39 @@
 <p>While component injection occurs only on fields, the injection in the IoC layer may be triggered by a  field or a constructor. The following example demonstrates field injection, when a single persistence unit is defined in the persistence descriptor.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class UserDAOImpl <span class="code-keyword">implements</span> UserDAO {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class UserDAOImpl implements UserDAO {
    @Inject
-   <span class="code-keyword">private</span> EntityManager entityManager;
+   private EntityManager entityManager;
 
    ...
-}</pre>
+}]]></script>
 </div></div>
 
 <p>The constructor injection is demonstrated in the following example.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class UserDAOImpl <span class="code-keyword">implements</span> UserDAO {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class UserDAOImpl implements UserDAO {
 
-   <span class="code-keyword">private</span> EntityManager entityManager;
+   private EntityManager entityManager;
 
-   <span class="code-keyword">public</span> UserDAOImpl(EntityManager entityManager) {
-      <span class="code-keyword">this</span>.entityManager = entityManager;
+   public UserDAOImpl(EntityManager entityManager) {
+      this.entityManager = entityManager;
    }
 
    ...
-}</pre>
+}]]></script>
 </div></div>
 
 <p>If multiple persistence units are defined in the same application, you need to disambiguate the unit to inject. This is done with the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/PersistenceContext.html" >@PersistenceContext</a> annotation, as shown in the following example. Because @PersistenceContext must not be placed on constructor parameters, you can&#8217;t use constructor injection and must switch to field injection.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class UserDAOImpl <span class="code-keyword">implements</span> UserDAO {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class UserDAOImpl implements UserDAO {
    @Inject
-   @PersistenceContext(unitName = <span class="code-quote">"DemoUnit"</span>)
-   <span class="code-keyword">private</span> EntityManager entityManager;
+   @PersistenceContext(unitName = "DemoUnit")
+   private EntityManager entityManager;
 
    ...
-}</pre>
+}]]></script>
 </div></div>
 
 <h1><a shape="rect" name="IntegratingwithJPA-Transactionmanagement"></a>Transaction management</h1>
@@ -278,43 +290,43 @@
 <p>As you may already know from the Hibernate integration library, Tapestry automatically manages transactions for you. The JPA integration library defines the @CommitAfter annotation, which acts as the correspondent annotation from the Hibernate integration library. Let&#8217;s explore the <em>UserDAO</em> interface to see the annotation in action.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> <span class="code-keyword">interface</span> UserDAO {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public interface UserDAO {
 
    @CommitAfter
-   @PersistenceContext(unitName = <span class="code-quote">"DemoUnit"</span>)
+   @PersistenceContext(unitName = "DemoUnit")
    void add(User user);
 
    List&lt;User&gt; findAll();
 
    @CommitAfter
-   @PersistenceContext(unitName = <span class="code-quote">"DemoUnit"</span>)
+   @PersistenceContext(unitName = "DemoUnit")
    void delete(User... users);
-}</pre>
+}]]></script>
 </div></div>
 
 <p>As you can see, the annotation may be placed on service method in order to mark that method as transactional. Any method marked with the @CommitAfter annotation will have a transaction started before, and committed after, it is called. Runtime exceptions thrown by by a transactional method will abort the transaction. Checked exceptions are ignored and the transaction will be committed anyway.</p>
 
-<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Note that <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityTransaction.html" >EntityTransaction</a> interface does not support two phase commits. Committing transactions of multiple EntityManagers in the same request might result in data consistency issues. That&#8217;s why @CommitAfter annotation must be accompanied by the @PersistenceContext annotation if multiple persistence unit are defined in an application. This way you can only commit the transaction of a single persistence unit. You should be very carefully, if you are committing multiple transactions manually in the same request.</td></tr></table></div>
+<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Note that <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/persistence/EntityTransaction.html" >EntityTransaction</a> interface does not support two phase commits. Committing transactions of multiple EntityManagers in the same request might result in data consistency issues. That&#8217;s why @CommitAfter annotation must be accompanied by the @PersistenceContext annotation if multiple persistence unit are defined in an application. This way you can only commit the transaction of a single persistence unit. You should be very carefully, if you are committing multiple transactions manually in the same request.</td
 ></tr></table></div>
 
 <p>After placing the @CommitAfter annotation on methods, you need to tell Tapestry to advise those methods. This is accomplished by adding the transaction advice, as shown in the following example.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class AppModule {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class AppModule {
 
-   @Match(<span class="code-quote">"*DAO"</span>)
-   <span class="code-keyword">public</span> <span class="code-keyword">static</span> void adviseTransactionally(
+   @Match("*DAO")
+   public static void adviseTransactionally(
          JpaTransactionAdvisor advisor,
          MethodAdviceReceiver receiver) {
 
       advisor.addTransactionCommitAdvice(receiver);
    }
-}</pre>
+}]]></script>
 </div></div></div>
 </div>
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -325,7 +337,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/integrating-with-jpa.html" async="true">

Modified: websites/production/tapestry/content/integrating-with-spring-framework.html
==============================================================================
--- websites/production/tapestry/content/integrating-with-spring-framework.html (original)
+++ websites/production/tapestry/content/integrating-with-spring-framework.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,19 @@
     Integrating with Spring Framework -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.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"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +46,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -90,13 +102,13 @@
 <p>To integrate Spring with Tapestry, you should add the below dependency in your classpath. The following exemple is for Maven users.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-  <span class="code-tag">&lt;dependency&gt;</span>
-    <span class="code-tag">&lt;groupId&gt;</span>org.apache.tapestry<span class="code-tag">&lt;/groupId&gt;</span>
-    <span class="code-tag">&lt;artifactId&gt;</span>tapestry-spring<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>[your-tapestry-version]<span class="code-tag">&lt;/version&gt;</span>
-  <span class="code-tag">&lt;/dependency&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;dependency&gt;
+    &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
+    &lt;artifactId&gt;tapestry-spring&lt;/artifactId&gt;
+    &lt;version&gt;[your-tapestry-version]&lt;/version&gt;
+  &lt;/dependency&gt;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="IntegratingwithSpringFramework-Updateyourweb.xmlfile"></a>Update your web.xml file</h3>
@@ -106,23 +118,23 @@
 <p>First, a special filter is used in replace of the standard TapestryFilter:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
   &lt;filter&gt;
     &lt;filter-name&gt;app&lt;/filter-name&gt;
     &lt;!-- Special filter that adds in a T5 IoC module derived from the Spring WebApplicationContext. --&gt;
     &lt;filter-class&gt;org.apache.tapestry5.spring.TapestrySpringFilter&lt;/filter-class&gt;
-  &lt;/filter&gt;</pre>
+  &lt;/filter&gt;]]></script>
 </div></div>
 
 <p>Secondly, you may add the normal Spring configuration, consisting of an optional &lt;context-param&gt; identifying which Spring bean configuration file(s) to load:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;context-param&gt;
   &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
   &lt;param-value&gt;/WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml&lt;/param-value&gt;
 &lt;/context-param&gt;
-</pre>
+]]></script>
 </div></div>
 
 <p>The &lt;context-param&gt; lists the Spring bean configuration file. It is optional and defaults to just /WEB-INF/applicationContext.xml if omitted.</p>
@@ -132,10 +144,10 @@
 <p>By integrating Spring in Tapestry, you get full access on Spring ApplicationContext as if you were accessing to any Tapestry service. Simply @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> into your pages and components.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
   @Inject
-  <span class="code-keyword">private</span> ApplicationContext springContext;
-</pre>
+  private ApplicationContext springContext;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="IntegratingwithSpringFramework-Injectingbeans"></a>Injecting beans</h3>
@@ -143,16 +155,16 @@
 <p>Inside your component classes, you may use the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> annotation. Typically, just adding @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> to the field type is sufficient to identify the Spring bean to inject:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
   @Inject
-  <span class="code-keyword">private</span> UserDAO userDAO;</pre>
+  private UserDAO userDAO;]]></script>
 </div></div>
 
 <p>Searching for Spring beans is threaded into the <a shape="rect" href="injection.html" title="Injection">MasterObjectProvider service</a>. The Spring context becomes one more place that Tapestry searches when determining the injection for a injected field or method parameter.</p>
 
 
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.2</b><br clear="none"></td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.2</b><br clear="none"></td></tr></table></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
 <h3><a shape="rect" name="IntegratingwithSpringFramework-InjectingTapestryservicesinSpringbeans"></a>Injecting Tapestry services in Spring beans</h3>
 
@@ -165,25 +177,25 @@
 <p>Simply add these two annotations on top the field you want to inject in your Spring bean.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
   @Inject
   @Autowired
-  <span class="code-keyword">private</span> MyService myService;
-</pre>
+  private MyService myService;
+]]></script>
 </div></div>
 
 <p>or use @Inject on top of arguments in @Autowired bean constructor methods</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-  <span class="code-keyword">private</span> <span class="code-keyword">final</span> MyService myService;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+  private final MyService myService;
 
   @Autowired
-  <span class="code-keyword">public</span> UserDAOImpl(@Inject MyService myService)
+  public UserDAOImpl(@Inject MyService myService)
   {
-    <span class="code-keyword">this</span>.myService = myService;
+    this.myService = myService;
   }
-</pre>
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="IntegratingwithSpringFramework-ConfiguringSpringwithTapestrySymbols"></a>Configuring Spring with Tapestry Symbols</h3>
@@ -191,11 +203,11 @@
 <p>This is accomplished by a BeanFactoryPostProcessors that resolves the values of 'placeholders' from symbol values. In the following example the value of the Bean's property 'productionMode' is the value of the Tapestry's  symbol <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html#PRODUCTION_MODE">tapestry.production-mode</a></p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-  <span class="code-tag">&lt;bean id=<span class="code-quote">"myBean"</span> class=<span class="code-quote">"org.example.MyBean"</span>&gt;</span>
-    <span class="code-tag">&lt;property name=<span class="code-quote">"productionMode"</span> value=<span class="code-quote">"${tapestry.production-mode}"</span>/&gt;</span>
-  <span class="code-tag">&lt;/bean&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;bean id="myBean" class="org.example.MyBean"&gt;
+    &lt;property name="productionMode" value="${tapestry.production-mode}"/&gt;
+  &lt;/bean&gt;
+]]></script>
 </div></div>
 
 </div>
@@ -224,7 +236,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -235,7 +247,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/integrating-with-spring-framework.html" async="true">

Modified: websites/production/tapestry/content/integration-testing.html
==============================================================================
--- websites/production/tapestry/content/integration-testing.html (original)
+++ websites/production/tapestry/content/integration-testing.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,19 @@
     Integration Testing -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.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"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +46,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -80,30 +92,31 @@
 
 <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="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">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></td></tr></table></div>
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">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></td></tr></table></div>
 
 <p>Here's an example from one of the Tapestry modules:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Your Integration Test Class : SinglePersistenceUnitIntegrationTest.java</b></div><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">package</span> org.apache.tapestry5.jpa.integration.app2;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+package org.apache.tapestry5.jpa.integration.app2;
 
-<span class="code-keyword">import</span> org.apache.tapestry5.test.SeleniumTestCase;
-<span class="code-keyword">import</span> org.testng.annotations.Test;
+import org.apache.tapestry5.test.SeleniumTestCase;
+import org.testng.annotations.Test;
 
-<span class="code-keyword">public</span> class SinglePersistenceUnitIntegrationTest <span class="code-keyword">extends</span> SeleniumTestCase
+public class SinglePersistenceUnitIntegrationTest extends SeleniumTestCase
 {
 
     @Test
-    <span class="code-keyword">public</span> void persist_entities()
+    public void persist_entities()
     {
-        open(<span class="code-quote">"/persistitem"</span>);
-        assertEquals(getText(<span class="code-quote">"<span class="code-comment">//span[@id='name']"</span>).length(), 0);
-</span>
-        clickAndWait(<span class="code-quote">"link=create item"</span>);
-        assertText(<span class="code-quote">"<span class="code-comment">//span[@id='name']"</span>, <span class="code-quote">"name"</span>);
-</span>    }
+        open("/persistitem");
+        assertEquals(getText("//span[@id='name']").length(), 0);
+
+        clickAndWait("link=create item");
+        assertText("//span[@id='name']", "name");
+    }
 }
-</pre>
+]]></script>
 </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>
@@ -121,17 +134,18 @@
 
 <p>Here's an example :</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>testng.xml</b></div><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;suite name=<span class="code-quote">"Selenium Tests Suite"</span> annotations=<span class="code-quote">"1.5"</span>&gt;</span>
-  <span class="code-tag">&lt;test name=<span class="code-quote">"Integration Tests"</span> enabled=<span class="code-quote">"true"</span>&gt;</span>
-    <span class="code-tag">&lt;parameter name=<span class="code-quote">"tapestry.browser-start-command"</span> value=<span class="code-quote">"*googlechrome"</span> /&gt;</span>
-    <span class="code-tag">&lt;parameter name=<span class="code-quote">"tapestry.port"</span> value=<span class="code-quote">"9091"</span> /&gt;</span>
-
-    <span class="code-tag">&lt;classes&gt;</span>
-      <span class="code-tag">&lt;class name=<span class="code-quote">"com.example.newapp.SeleniumTest"</span>&gt;</span><span class="code-tag">&lt;/class&gt;</span>
-    <span class="code-tag">&lt;/classes&gt;</span>
-  <span class="code-tag">&lt;/test&gt;</span>
-<span class="code-tag">&lt;/suite&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&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="com.example.newapp.SeleniumTest"&gt;&lt;/class&gt;
+    &lt;/classes&gt;
+  &lt;/test&gt;
+&lt;/suite&gt;
+]]></script>
 </div></div>
 
 <h1><a shape="rect" name="IntegrationTesting-SomeInterestingTools"></a>Some Interesting Tools</h1>
@@ -144,7 +158,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -155,7 +169,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/integration-testing.html" async="true">

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 Sep 22 22:21:21 2013
@@ -24,7 +24,18 @@
     Integration with existing applications -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +45,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -64,7 +75,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="security-faq.html"><img align="middle" border="0" src="/images/confluence/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="/images/confluence/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" href="request-processing-faq.html"><img align="middle" border
 ="0" src="/images/confluence/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>
+/*]]>*/</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><a shape="rect" name="Integrationwithexistingapplications-Integrationwithexistingapplications"></a>Integration with existing applications</h2>
 
@@ -151,31 +162,31 @@ var footnoteMarkerHighlight = function(i
 , and the URL will be <tt>/loginform</tt>.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-&lt;form method=<span class="code-quote">"post"</span> action=<span class="code-quote">"/loginform"</span>&gt;
+<script class="theme: Default; brush: java; gutter: true" type="syntaxhighlighter"><![CDATA[
+&lt;form method="post" action="/loginform"&gt;
 
-  &lt;input type=<span class="code-quote">"text"</span> value=<span class="code-quote">"userName"</span>/&gt;
+  &lt;input type="text" value="userName"/&gt;
   &lt;br/&gt;
-  &lt;input type=<span class="code-quote">"password"</span> value=<span class="code-quote">"password"</span>/&gt;
+  &lt;input type="password" value="password"/&gt;
   &lt;br/&gt;
-  &lt;input type=<span class="code-quote">"submit"</span> value=<span class="code-quote">"Login"</span>/&gt;
+  &lt;input type="submit" value="Login"/&gt;
 
 &lt;/form&gt;
-</pre>
+]]></script>
 </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" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> class LoginForm
+<script class="theme: Default; brush: java; gutter: true" type="syntaxhighlighter"><![CDATA[
+public class LoginForm
 {
-  void onActivate(@RequestParameter(<span class="code-quote">"userName"</span>) <span class="code-object">String</span> userName, @RequestParameter(<span class="code-quote">"password"</span>) <span class="code-object">String</span> password)
+  void onActivate(@RequestParameter("userName") String userName, @RequestParameter("password") String password)
   {
-     <span class="code-comment">// Validate and store credentials, etc.
-</span>  }
+     // Validate and store credentials, etc.
+  }
 }
-</pre>
+]]></script>
 </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>
@@ -188,13 +199,13 @@ var footnoteMarkerHighlight = function(i
 <p>On the Tapestry side, it is very easy to read and write session attributes:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> class ShowSearchResults
+<script class="theme: Default; brush: java; gutter: true" type="syntaxhighlighter"><![CDATA[
+public class ShowSearchResults
 {
   @SessionAttribute
-  <span class="code-keyword">private</span> SearchResults searchResults;
+  private SearchResults searchResults;
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>Reading the instance variable <tt>searchResults</tt> is instrumented to instead read the corresponding HttpSession attribute named "searchResults".  You can also specify the <tt>value</tt> attribute of the SessionAttribute annotation to override the default attribute name.</p>
@@ -215,7 +226,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="security-faq.html"><img align="middle" border="0" src="/images/confluence/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="/images/confluence/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" href="request-processing-faq.html"><img align="middle" border
 ="0" src="/images/confluence/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>
+/*]]>*/</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>
 
 <hr>
 <p><table class="Footnotes" style="width: 100%; border:none;" cellspacing="0" cellpadding="0" summary="This table contains one or more notes for references made elsewhere on the page."><caption class="accessibility">Footnotes</caption><thead class="accessibility"><tr class="accessibility"><th colspan="1" rowspan="1" class="accessibility" id="footnote-th1">Reference</th><th colspan="1" rowspan="1" class="accessibility" id="footnote-th2">Notes</th></tr></thead><tbody><tr name="Footnote1"><td colspan="1" rowspan="1" valign="top" class="FootnoteNum" headings="footnote-th1">
@@ -229,7 +240,7 @@ table.ScrollbarTable td.ScrollbarNextIco
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -240,7 +251,7 @@ table.ScrollbarTable td.ScrollbarNextIco
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/integration-with-existing-applications.html" async="true">