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 [2/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/31...

Modified: websites/production/tapestry/content/ajax-components-faq.html
==============================================================================
--- websites/production/tapestry/content/ajax-components-faq.html (original)
+++ websites/production/tapestry/content/ajax-components-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,30 +67,22 @@
   </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="javascript-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="javascript-faq.html">JavaScript 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="injection-faq.html">Injection FAQ</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="injecti
 on-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="AjaxComponentsFAQ-AjaxComponents">Ajax Components</h2><p>Main article: <a shape="rect" href="ajax-and-zones.html">Ajax and Zones</a></p><h3 id="AjaxComponentsFAQ-DoIhavetospecifybothidandt:idforZonecomponents?">Do I have to specify both <code>id</code> and <code>t:id</code> for Zone components?</h3><p>The examples for the Zone component (in the Component Reference) consistently specify both <code>id</code> and <code>t:id</code> and this is probably a good idea.</p><p>Generally speaking, if you don't specify the client-side id (the <code>id</code> attribute), it will be the same as the Tapestry component id (<code>t:id</code>).</p><p>However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique client side id). The Zone may be rend
 ering as part of a partial page render, in which case, a random unique id is inserted into the id. There are other examples where Tapestry component ids in nested components may also clash.</p><p>The point is, to be sure, specify the exact client id. This will be the value for the <code>zone</code> parameter of the triggering component (such as a Form, PageLink, ActionLink, etc.).</p><h3 id="AjaxComponentsFAQ-HowdoIupdatethecontentofaZonefromaneventhandlermethod?">How do I update the content of a Zone from an event handler method?</h3><p>When a client-side link or form triggers an update, the return value from the event handler method is used to construct a partial page response; this partial page response includes markup content that is used to update the Zone's client-side <code>&lt;div&gt;</code> element.</p><p>Where does that content come from? You inject it into your page.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;t:zone id=&quot;search&quot; t:id=&quot;searchZone&quot;&gt;
-  &lt;t:form t:id=&quot;searchForm&quot; zone=&quot;searchZone&quot;&gt;
-    &lt;t:textfield t:id=&quot;query&quot; size=&quot;20&quot;/&gt;
-    &lt;input type=&quot;submit&quot; value=&quot;Search&quot;/&gt;
+<div id="ConfluenceContent"><h2 id="AjaxComponentsFAQ-AjaxComponents">Ajax Components</h2><p>Main article: <a shape="rect" href="ajax-and-zones.html">Ajax and Zones</a></p><h3 id="AjaxComponentsFAQ-DoIhavetospecifybothidandt:idforZonecomponents?">Do I have to specify both <code>id</code> and <code>t:id</code> for Zone components?</h3><p>The examples for the Zone component (in the Component Reference) consistently specify both <code>id</code> and <code>t:id</code> and this is probably a good idea.</p><p>Generally speaking, if you don't specify the client-side id (the <code>id</code> attribute), it will be the same as the Tapestry component id (<code>t:id</code>).</p><p>However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique client side id). The Zone may be rendering as part of a partial page render, in which case, a random unique id is inserted into the id. There are other examples where Tapes
 try component ids in nested components may also clash.</p><p>The point is, to be sure, specify the exact client id. This will be the value for the <code>zone</code> parameter of the triggering component (such as a Form, PageLink, ActionLink, etc.).</p><h3 id="AjaxComponentsFAQ-HowdoIupdatethecontentofaZonefromaneventhandlermethod?">How do I update the content of a Zone from an event handler method?</h3><p>When a client-side link or form triggers an update, the return value from the event handler method is used to construct a partial page response; this partial page response includes markup content that is used to update the Zone's client-side <code>&lt;div&gt;</code> element.</p><p>Where does that content come from? You inject it into your page.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;t:zone id="search" t:id="searchZone"&gt;
+  &lt;t:form t:id="searchForm" zone="searchZone"&gt;
+    &lt;t:textfield t:id="query" size="20"/&gt;
+    &lt;input type="submit" value="Search"/&gt;
   &lt;/t:form&gt;
 &lt;/t:zone&gt;
 
-&lt;t:block id=&quot;searchResults&quot;&gt;
+&lt;t:block id="searchResults"&gt;
   &lt;ul&gt;
-    &lt;li t:type=&quot;loop&quot; source=&quot;searchHits&quot; value=&quot;searchHit&quot;&gt;${searchHit}&lt;/li&gt;
+    &lt;li t:type="loop" source="searchHits" value="searchHit"&gt;${searchHit}&lt;/li&gt;
   &lt;/ul&gt;
 &lt;/t:block&gt;
-]]></script>
+</pre>
 </div></div><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[  @Inject
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  @Inject
   private Block searchResults;
 
   Object onSuccessFromSearchForm()
@@ -89,18 +91,18 @@ table.ScrollbarTable td.ScrollbarNextIco
 
     return searchResults;
   }
-]]></script>
+</pre>
 </div></div><p>So, when the search form is submitted, the resulting search hits are collected. In the same request, the searchResults block is rendered, package, and sent to the client. The form inside the client-side Zone <code>&lt;div&gt;</code> is replaced with the list of hits.</p><p>In many cases, you just want to re-render the Zone itself, to display updated content. In that case, you don't need a separate <code>&lt;t:block&gt;</code>, instead you can use @InjectComponent to inject the Zone object itself, and return the Zone's body:</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[  @InjectComponent
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  @InjectComponent
   private Zone statusZone;
 
   Object onActionFromUpdateStatus()
   {
     return statusZone.getBody();
   }
-]]></script>
+</pre>
 </div></div><h3 id="AjaxComponentsFAQ-HowtoIupdatemultiplezonesinasingleeventhandler?">How to I update multiple zones in a single event handler?</h3><p>To do this, you must know, on the server, the client ids of each Zone. That's one of the reasons that you will generally set the Zone's client id (via the Zone's id parameter), rather than let Tapestry assign a client id for you.</p><p>From the event handler method, instead of returning a Block or a Component, return a multi-zone update:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Multiple Zone Update (5.2)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  @Inject
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  @Inject
   private Block searchResults;
 
   @Inject
@@ -110,13 +112,13 @@ table.ScrollbarTable td.ScrollbarNextIco
   {
     searchHits = searchService.performSearch(query);
 
-    message = String.format(&quot;Found %,d matching documents&quot;, searchHits.size());
+    message = String.format("Found %,d matching documents", searchHits.size());
 
-    return new MultiZoneUpdate(&quot;results&quot;, searchResults).add(&quot;status&quot;, statusBlock);
+    return new MultiZoneUpdate("results", searchResults).add("status", statusBlock);
   }
-]]></script>
+</pre>
 </div></div><p>The above will work in Tapestry 5.3, but MultiZoneUpdate is deprecated. For 5.3 and later, use AjaxResponseRenderer instead:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Multiple Zone Update (5.3)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  @Inject
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  @Inject
   private Block searchResults;
 
   @Inject
@@ -129,29 +131,21 @@ table.ScrollbarTable td.ScrollbarNextIco
   {
     searchHits = searchService.performSearch(query);
 
-    message = String.format(&quot;Found %,d matching documents&quot;, searchHits.size());
+    message = String.format("Found %,d matching documents", searchHits.size());
 
-    ajaxResponseRenderer.addRender(&quot;results&quot;, searchResults).addRender(&quot;status&quot;, statusBlock);
+    ajaxResponseRenderer.addRender("results", searchResults).addRender("status", statusBlock);
   }
-]]></script>
+</pre>
 </div></div><p>AjaxResponseRenderer adds other useful commands as well. It also has the advantage that a simple return value can be returned to render content for the Zone that triggered the request.</p><h3 id="AjaxComponentsFAQ-What'sthatweirdnumberinthemiddleoftheclientidsafteraZoneisupdated?">What's that weird number in the middle of the client ids after a Zone is updated?</h3><p>You might start with markup in your template for a component such as a TextField:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;t:textfield t:id=&quot;firstName&quot;/&gt;
-]]></script>
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">  &lt;t:textfield t:id="firstName"/&gt;
+</pre>
 </div></div><p>When the component initially renders as part of a full page render, you get a sensible bit of markup:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;input id=&quot;firstName&quot; name=&quot;firstName&quot; type=&quot;text&quot;&gt;
-]]></script>
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">  &lt;input id="firstName" name="firstName" type="text"&gt;
+</pre>
 </div></div><p>But when the form is inside a Zone and rendered as part of a zone update, the ids get weird:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[   &lt;input id=&quot;firstName_12a820cc40e&quot; name=&quot;firstName&quot; type=&quot;text&quot;&gt;
-]]></script>
-</div></div><p>What's happening here is that Tapestry is working to prevent unwanted id clashes as part of the page update. In an HTML document, each <code>id</code> is expected to be unique; most JavaScript is keyed off of the <code>id</code> field, for instance.</p><p>In a full page render, components don't just use their component id (<code>t:id</code>) as their client id; instead they use the <code>JavaScriptSupport</code> environmental to allocate a unique id. When there's no loops or conflicts, the client id matches the component id.</p><p>When the component is inside a loop, a suffix is appended: <code>firstName</code>, <code>firstName_0</code>, <code>firstName_1</code>, etc.</p><p>When the component is rendered as part of an Ajax partial page update, the rules are different. Since Tapestry doesn't know what content has been rendered onto the page previously, it can't use its normal tricks to ensure that ids are unique.</p><p>Instead, Tapestry creates a random-ish unique id s
 uffix, such as "12a820cc40e" in the example; this suffix is appended to all allocated ids to ensure that they do not conflict with previously rendered ids.</p><h3 id="AjaxComponentsFAQ-WhydoIsometimesgettheexception&quot;Therenderedcontentdidnotincludeanyelementsthatallowforthepositioningofthehiddenformfield'selement.&quot;whenrenderinganemptyZone?">Why do I sometimes get the exception "The rendered content did not include any elements that allow for the positioning of the hidden form field's element." when rendering an empty Zone?</h3><p>As part of Tapestry's form processing, it must write a hidden input element with information needed when the form is submitted. Since the content of a Zone may be changed or removed, a hidden field is created just for the Zone, separate from the rest of the enclosing form.</p><p>At the same time, Tapestry wants to position the &lt;input&gt; field in a valid location, and HTML defines some constraints for that; an input field must appear inside a &l
 t;p&gt; or &lt;div&gt; element. In your empty Zone, there's no place to put the hidden element.</p><p>The solution is to add a &lt;div&gt; element to the body of the zone; t<span style="line-height: 1.4285715;">his ensures that there's a place for the hidden input field. &#160;An empty &lt;div&gt; element (even one containing a hidden form field) will not affect page layout.</span></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="javascript-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="javascript-faq.html">JavaScript 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="injection-faq.html">Injection FAQ</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="injecti
 on-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></div>
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">   &lt;input id="firstName_12a820cc40e" name="firstName" type="text"&gt;
+</pre>
+</div></div><p>What's happening here is that Tapestry is working to prevent unwanted id clashes as part of the page update. In an HTML document, each <code>id</code> is expected to be unique; most JavaScript is keyed off of the <code>id</code> field, for instance.</p><p>In a full page render, components don't just use their component id (<code>t:id</code>) as their client id; instead they use the <code>JavaScriptSupport</code> environmental to allocate a unique id. When there's no loops or conflicts, the client id matches the component id.</p><p>When the component is inside a loop, a suffix is appended: <code>firstName</code>, <code>firstName_0</code>, <code>firstName_1</code>, etc.</p><p>When the component is rendered as part of an Ajax partial page update, the rules are different. Since Tapestry doesn't know what content has been rendered onto the page previously, it can't use its normal tricks to ensure that ids are unique.</p><p>Instead, Tapestry creates a random-ish unique id s
 uffix, such as "12a820cc40e" in the example; this suffix is appended to all allocated ids to ensure that they do not conflict with previously rendered ids.</p><h3 id="AjaxComponentsFAQ-WhydoIsometimesgettheexception&quot;Therenderedcontentdidnotincludeanyelementsthatallowforthepositioningofthehiddenformfield'selement.&quot;whenrenderinganemptyZone?">Why do I sometimes get the exception "The rendered content did not include any elements that allow for the positioning of the hidden form field's element." when rendering an empty Zone?</h3><p>As part of Tapestry's form processing, it must write a hidden input element with information needed when the form is submitted. Since the content of a Zone may be changed or removed, a hidden field is created just for the Zone, separate from the rest of the enclosing form.</p><p>At the same time, Tapestry wants to position the &lt;input&gt; field in a valid location, and HTML defines some constraints for that; an input field must appear inside a &l
 t;p&gt; or &lt;div&gt; element. In your empty Zone, there's no place to put the hidden element.</p><p>The solution is to add a &lt;div&gt; element to the body of the zone; t<span style="line-height: 1.4285715;">his ensures that there's a place for the hidden input field. &#160;An empty &lt;div&gt; element (even one containing a hidden form field) will not affect page layout.</span></p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/aliases.html
==============================================================================
--- websites/production/tapestry/content/aliases.html (original)
+++ websites/production/tapestry/content/aliases.html Sun Jul 19 21:21:27 2015
@@ -92,13 +92,13 @@
 <p>You can then contribute into the Infrastructure service's configuration:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-  public static void contributeAlias(@InjectService(&quot;MyService&quot;) MyService myService,
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
+  public static void contributeAlias(@InjectService("MyService") MyService myService,
      Configuration&lt;AliasContribution&gt; configuration)
   {
      configuration.add(AliasContribution.create(MyService.class, myService));
   }
-]]></script>
+</pre>
 </div></div>
 
 <p>The above example follows a typical pattern; the service to be vended is injected into the contributor method, using the explicit InjectService annotation. A contribution is made providing the service type.</p>

Modified: websites/production/tapestry/content/annotations.html
==============================================================================
--- websites/production/tapestry/content/annotations.html (original)
+++ websites/production/tapestry/content/annotations.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/application-module-class-cheat-sheet.html
==============================================================================
--- websites/production/tapestry/content/application-module-class-cheat-sheet.html (original)
+++ websites/production/tapestry/content/application-module-class-cheat-sheet.html Sun Jul 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,17 +67,24 @@
   </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">
 
-/*]]>*/</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="cheat-sheets.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="cheat-sheets.html">Cheat Sheets</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="component-cheat-sheet.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 class="toc-macro client-side-toc-macro" data-headerelements="H1,H2,H3,H4,H5,H6,H7"></div>
+<style type="text/css">/*<![CDATA[*/
+div.rbtoc1437340809765 {padding: 0px;}
+div.rbtoc1437340809765 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1437340809765 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style><div class="toc-macro rbtoc1437340809765">
+<ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Namingconventions">Naming conventions</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Thebindmethod">The bind method</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Servicebuildermethods">Service builder methods</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Contributemethods">Contribute methods</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Unordered">Unordered</a></li></ul>
+</li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Decoratemethods">Decorate methods</a></li></ul>
+</li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Annotations">Annotations</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-parameter-typesParametertypes">Parameter types</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Configurationparametertypes">Configuration parameter types</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Linktoservices">Link to services</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Symbols">Symbols</a></li></ul>
+</li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Loadservicesonregistrystartup">Load services on registry startup</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Defineservicescope">Define service scope</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Disambiguateservices">Disambiguate services</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-WithserviceId">With service Id</a></li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-WithMarkers">With Markers</a></li></ul>
+</li><li><a shape="rect" href="#ApplicationModuleClassCheatSheet-Overrideexistingservices">Override existing services</a></li></ul>
+</div>
 
 <div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
 <div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div>
@@ -92,7 +109,7 @@ table.ScrollbarTable td.ScrollbarNextIco
 <p>Every module may have an optional, static bind() method which is passed a ServiceBinder. By using the ServiceBinder, you will let Tapestry <em>autobuild</em> your services. Autobuilding is the <strong>preferred way</strong> to instantiate your services.</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 package org.example.myapp.services;
 
 import org.apache.tapestry5.ioc.ServiceBinder;
@@ -104,7 +121,7 @@ public class MyAppModule
     binder.bind(Indexer.class, IndexerImpl.class);
   }
 }
-]]></script>
+</pre>
 </div></div>
 
 <p>Allowing Tapestry to instantiate your service implementations means that, during development, they will live-reload.</p>
@@ -116,7 +133,7 @@ public class MyAppModule
 <p>Sometime you need to do more than just instantiate the class with dependencies. It is common inside Tapestry for one service to be a listener to events from another service. In that situation (or other similar ones), a service builder method is useful, as it shifts control back to your code, where you have the freedom to perform any additional operations necessary to get the service implementation up and running.</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 package org.example.myapp.services;
 
 public class MyAppModule
@@ -126,7 +143,7 @@ public class MyAppModule
     return new IndexerImpl();
   }
 }
-]]></script>
+</pre>
 </div></div>
 
 <p>Here the service interface is Indexer. Tapestry IoC doesn't know about the IndexerImpl class (the service implementation of the Indexer service), but it does know about the build() method. Since Tapestry isn't instantiating the implementation class, there is no possibility of live class reloading.</p>
@@ -134,7 +151,7 @@ public class MyAppModule
 <p>Here's a more complicated example:</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 static AssetFactory buildClasspathAssetFactory(ResourceCache resourceCache,
             ClasspathAssetAliasManager aliasManager, AssetPathConverter converter)
@@ -145,7 +162,7 @@ public class MyAppModule
 
         return factory;
     }
-]]></script>
+</pre>
 </div></div>
 
 <p>What's important in this example is that ClasspathAssetFactory, the implementation class, implements the InvalidationListener interface.  AssetFactory, the service interface, does <strong>not</strong> extend the InvalidationListener interface.</p>
@@ -153,7 +170,7 @@ public class MyAppModule
 <p>Tapestry has evolved some additional tools to "have your cake and eat it too"; the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Autobuild.html">Autobuild</a> annotation takes care of instantiating a service implementation, with dependencies, allowing your code to focus on the extra initialization logic, and not on the dependencies:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<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 PersistentFieldStrategy buildClientPersistentFieldStrategy(LinkCreationHub linkCreationHub, @Autobuild
     ClientPersistentFieldStrategy service)
     {
@@ -161,7 +178,7 @@ public class MyAppModule
 
         return service;
     }
-]]></script>
+</pre>
 </div></div>
 
 <h3 id="ApplicationModuleClassCheatSheet-Contributemethods">Contribute methods</h3>
@@ -175,18 +192,18 @@ public class MyAppModule
 <p>For example, here's a kind of tapestry internal service that requires a list of Coercion tuples to be able to coerce values from one type to another (i.e. from string to the target type when reading values from the HTTP request)</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 public TypeCoercerImpl(Collection&lt;CoercionTuple&gt; tuples)
 {
     // ...
 }
-]]></script>
+</pre>
 </div></div>
 
 <p>On the contribution side, a service contribution method sees a Configuration object:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<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 contributeTypeCoercer(Configuration&lt;CoercionTuple&gt; configuration) {
 {
     // Create Coercion tuple here
@@ -194,7 +211,7 @@ public static void contributeTypeCoercer
 
     configuration.add(myTuple);
 }
-]]></script>
+</pre>
 </div></div>
 
 <h3 id="ApplicationModuleClassCheatSheet-Decoratemethods">Decorate methods</h3>
@@ -250,16 +267,7 @@ public static void contributeTypeCoercer
 <h2 id="ApplicationModuleClassCheatSheet-Overrideexistingservices">Override existing services</h2>
 
 <p><em>content under development</em></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="cheat-sheets.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="cheat-sheets.html">Cheat Sheets</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="component-cheat-sheet.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/applications.html
==============================================================================
--- websites/production/tapestry/content/applications.html (original)
+++ websites/production/tapestry/content/applications.html Sun Jul 19 21:21:27 2015
@@ -57,7 +57,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://wookicentral.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Wooki - Opensource collaboration application" src="applications.data/wooki.png" data-image-src="/confluence/download/attachments/24190774/wooki.png?version=1&amp;modificationDate=1292939373000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="21921799" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="wooki.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18" title="Wooki - Opensource collaboration application"></span></a><br clear="none" class="atl-forced-newline"> <
 br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://wookicentral.com" >Wooki</a> Opensource collaboration application</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.seesaw.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Seesaw - Video streaming" src="applications.data/seesaw.png" data-image-src="/confluence/download/attachments/24190774/seesaw.png?version=1&amp;modificationDate=1292939402000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="21921800" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="seesaw.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18" title="Se
 esaw - Video streaming"></span></a> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.seesaw.com" >Seesaw</a> : Video streaming</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.oed.com/" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="The definitive Oxford English Dictionary" src="applications.data/oed.png" data-image-src="/confluence/download/attachments/24190774/oed.png?version=1&amp;modificationDate=1292939332000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346991" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="oed.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-c
 ontainer-id="24190774" data-linked-resource-container-version="18" title="The definitive Oxford English Dictionary"></span></a> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> The definitive <a shape="rect" class="external-link" href="http://www.oed.com/" >Oxford English Dictionary</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.belladati.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="BellaDati - Business Intelligence" src="applications.data/belladati.png" data-image-src="/confluence/download/attachments/24190774/belladati.png?version=1&amp;modificationDate=1316163150000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28016750" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="belladati.png" data-ba
 se-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18" title="BellaDati - Business Intelligence"></span></a><br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> Business Intelligence <a shape="rect" class="external-link" href="http://www.belladati.com" >BellaDati</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.yanomo.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Yanomo time tracking - SaaS with google calendar sync" src="applications.data/yanomo_calendar.png" data-image-src="/confluence/download/attachments/24190774/yanomo_calendar.png?version=2&amp;modificationDate=1354542452000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="3
 0966141" data-linked-resource-version="2" data-linked-resource-type="attachment" data-linked-resource-default-alias="yanomo_calendar.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18" title="Yanomo time tracking - SaaS with google calendar sync"></span></a> <br clear="none" class="atl-forced-newline"> &#160; <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.yanomo.com" >Yanomo time tracking</a>&#160;SaaS with Google sync</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.cubiculus.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Cubiculus - Lego Building Instructions" src="applications.data/cubiculus.png" data-image-src="/confluence/download
 /attachments/24190774/cubiculus.png?version=1&amp;modificationDate=1292939356000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346901" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="cubiculus.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18" title="Cubiculus - Lego Building Instructions"></span></a> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.cubiculus.com" >Cubiculus</a> : Lego Building Instructions</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.mybet.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-im
 age" alt="myBet - Sports Bets Casino Poker" src="applications.data/mybet.png" data-image-src="/confluence/download/attachments/24190774/mybet.png?version=1&amp;modificationDate=1292939346000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346999" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="mybet.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18" title="myBet - Sports Bets Casino Poker"></span></a> <br clear="none" class="atl-forced-newline"> &#160; <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.mybet.com" >myBet</a> : Sports Bets Casino Poker</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.eoffi
 ceo.com/" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="applications.data/eofficeo.png" data-image-src="/confluence/download/attachments/24190774/eofficeo.png?version=1&amp;modificationDate=1302859438000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="26214546" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="eofficeo.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18"></span></a><br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.eofficeo.com/" >eOfficeo</a> : Easy - Mobile - Collaborative</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span class="confluence-em
 bedded-file-wrapper"><img class="confluence-embedded-image" alt="Smartimage - Image management made simple" src="applications.data/smartimage.png" data-image-src="/confluence/download/attachments/24190774/smartimage.png?version=1&amp;modificationDate=1360261163000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="30966495" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="smartimage.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18" title="Smartimage - Image management made simple"></span></p><p><span>&#160;</span><a shape="rect" class="external-link" href="http://www.smartimage.com/" >Smartimage</a><span> : Image management made simple</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span class="confluence-embedded-file-wrapper"><img class="conflu
 ence-embedded-image" src="applications.data/jexbox.png" data-image-src="/confluence/download/attachments/24190774/jexbox.png?version=1&amp;modificationDate=1402053330000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="42041419" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jexbox.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24190774" data-linked-resource-container-version="18"></span></p><p><a shape="rect" class="external-link" href="https://jexbox.com/" >Jexbox</a> : Jexbox stores all errors from tapestry application</p><p>and helps developers resolve software bugs.</p></td></tr></tbody></table></div></div>
+<div id="ConfluenceContent"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://wookicentral.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Wooki - Opensource collaboration application" src="applications.data/wooki.png"></span></a><br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://wookicentral.com" >Wooki</a> Opensource collaboration application</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.seesaw.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Seesaw - Video streaming" src="applications.data/seesaw.png"></span></a> <br clear="none" class="atl-forced-newline"> <br clear=
 "none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.seesaw.com" >Seesaw</a> : Video streaming</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.oed.com/" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="The definitive Oxford English Dictionary" src="applications.data/oed.png"></span></a> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> The definitive <a shape="rect" class="external-link" href="http://www.oed.com/" >Oxford English Dictionary</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.belladati.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="BellaDati - Business Intelligence" src="
 applications.data/belladati.png"></span></a><br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> Business Intelligence <a shape="rect" class="external-link" href="http://www.belladati.com" >BellaDati</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.yanomo.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Yanomo time tracking - SaaS with google calendar sync" src="applications.data/yanomo_calendar.png"></span></a> <br clear="none" class="atl-forced-newline"> &#160; <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.yanomo.com" >Yanomo time tracking</a>&#160;SaaS with Google sync</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http:/
 /www.cubiculus.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Cubiculus - Lego Building Instructions" src="applications.data/cubiculus.png"></span></a> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.cubiculus.com" >Cubiculus</a> : Lego Building Instructions</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.mybet.com" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="myBet - Sports Bets Casino Poker" src="applications.data/mybet.png"></span></a> <br clear="none" class="atl-forced-newline"> &#160; <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.mybet.com" >myBet</a> : Sports Bets Casino
  Poker</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.eofficeo.com/" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="applications.data/eofficeo.png"></span></a><br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <a shape="rect" class="external-link" href="http://www.eofficeo.com/" >eOfficeo</a> : Easy - Mobile - Collaborative</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" alt="Smartimage - Image management made simple" src="applications.data/smartimage.png"></span></p><p><span>&#160;</span><a shape="rect" class="external-link" href="http://www.smartimage.com/" >Smartimage</a><span> : Image management made simple</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span c
 lass="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="applications.data/jexbox.png"></span></p><p><a shape="rect" class="external-link" href="https://jexbox.com/" >Jexbox</a> : Jexbox stores all errors from tapestry application</p><p>and helps developers resolve software bugs.</p></td></tr></tbody></table></div></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/assets.html
==============================================================================
--- websites/production/tapestry/content/assets.html (original)
+++ websites/production/tapestry/content/assets.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"/>
 
@@ -58,64 +68,64 @@
 
 <div id="content">
 <div id="ConfluenceContent"><h1 id="Assets-Assets">Assets</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>In Tapestry, <strong>Assets</strong> are any kind of <em>static</em> content that may be downloaded to a client web browser, such as images, style sheets and JavaScript files.</p><p>Assets are most commonly stored in the web application's context folder ... stored inside the web application WAR file in the usual JEE fashion. In addition, Tapestry treats files stored <em>on the classpath</em>, with your Java class files, as assets visible to the web browser.</p><p>Assets are exposed to your code as instances of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Asset.html">Asset</a> interface.</p><h3 id="Assets-AssetsinTemplates">Assets in Templates</h3><p>Assets can also be referenced directly in templates. Two <a shape="rect" hr
 ef="component-parameters.html#ComponentParameters-binding-expressions">binding prefixes</a> exist for this: "asset:" and "context:". The "asset:" prefix can obtain assets from the classpath (the default) or from the web context (by specifying the "context:" domain explicitly):</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[&lt;img src=&quot;${asset:context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
-]]></script>
+<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>In Tapestry, <strong>Assets</strong> are any kind of <em>static</em> content that may be downloaded to a client web browser, such as images, style sheets and JavaScript files.</p><p>Assets are most commonly stored in the web application's context folder ... stored inside the web application WAR file in the usual JEE fashion. In addition, Tapestry treats files stored <em>on the classpath</em>, with your Java class files, as assets visible to the web browser.</p><p>Assets are exposed to your code as instances of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Asset.html">Asset</a> interface.</p><h3 id="Assets-AssetsinTemplates">Assets in Templates</h3><p>Assets can also be referenced directly in templates. Two <a shape="rect" hr
 ef="component-parameters.html">binding prefixes</a> exist for this: "asset:" and "context:". The "asset:" prefix can obtain assets from the classpath (the default) or from the web context (by specifying the "context:" domain explicitly):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;img src="${asset:context:image/tapestry_banner.gif}" alt="Banner"/&gt;
+</pre>
 </div></div><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This is an example of using a <em>template expansion</em> inside an ordinary element (rather than a component).</p></div></div><p>Because accessing context assets is so common, the "context:" binding prefix was introduced:</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[&lt;img src=&quot;${context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
-]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;img src="${context:image/tapestry_banner.gif}" alt="Banner"/&gt;
+</pre>
 </div></div><h3 id="Assets-AssetsinComponentClasses">Assets in Component Classes</h3><p>Components learn about assets via <a shape="rect" href="injection.html">injection</a>. The @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> annotation allows Assets to be injected into components as read-only properties. The path to the resource is specified using the Path annotation:</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[@Inject
-@Path(&quot;context:images/tapestry_banner.gif&quot;)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Inject
+@Path("context:images/tapestry_banner.gif")
 private Asset banner;
-]]></script>
+</pre>
 </div></div><p>Assets are located within <em>domains</em>; these domains are identified by the prefix on the @Path annotation's <code>value</code>.</p><h3 id="Assets-ClasspathAssets">Classpath Assets&#160;</h3><p>If the prefix is omitted, the value will be interpreted as a path relative to the Java class file itself, within the "classpath:" domain. This is often used when creating component libraries, where the assets used by the components are packaged in the JAR with the components themselves.</p><p>Unlike elsewhere in Tapestry, <em>case matters</em>. This is because Tapestry is dependent on the Servlet API and the Java runtime to access the underlying files, and those APIs, unlike Tapestry, are case sensitive. Be aware that some <em>operating systems</em> (such as Windows) are case insensitive, which may mask errors that will be revealed at deployment (if the deployment operating system is case sensitive, such as Linux).</p><p>In Tapestry 5.3 and earlier, classpath assets are pac
 kaged in the same folder as the compiled Java class (as well as component templates and so forth). Relative assets are based on this location, the location of the component's .class file.</p><p>In Tapestry 5.4, this is supported (but will generate a runtime warning). Classpath resources are expected to be stored under&#160;<code>META-INF/assets</code>.</p><p>In Tapestry 5.5, support for classpath assets&#160;<strong>not</strong> under&#160;<code>META-INF/assets</code> will be removed.</p><h3 id="Assets-META-INF/assets">META-INF/assets</h3><p>Support for storing assets under&#160;<code>META-INF/assets</code> was added in Tapestry 5.4.</p><p>For security reasons (detailed below), it is best to have the assets that will be exposed to the client segregated from compiled Java classes. For that reason, classpath assets must be stored in&#160;<code>META-INF/assets</code> or a subfolder.</p><p>For an&#160;<em>application</em> asset, the assets can be stored directly in&#160;<code>META-INF/a
 ssets</code>.</p><p>For a&#160;<em>library</em> asset, Tapestry uses the library's name (from its LibraryMapping) (such as "core" for the Tapestry core library); &#160;The library name becomes a folder under&#160;<code>META-INF/assets</code>; for example, Tapestry stores its component-related assets under&#160;<code>META-INF/assets/core</code>.</p><h3 id="Assets-RelativeAssets">Relative Assets</h3><p>You can use relative paths with domains (if you omit the prefix):</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[@Inject
-@Path(&quot;images/edit.png&quot;)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Inject
+@Path("images/edit.png")
 private Asset icon;
-]]></script>
+</pre>
 </div></div><p>This represents a relative path from the default location for the asset. For Tapestry 5.4, this will resolve as either relative to the component's class file (the logic for Tapestry 5.3 and earlier), or relative to the correct folder within&#160;<code>META-INF/assets</code> (the logic for Tapestry 5.4 and later).</p><p>You may use the standard&#160;<code>./</code> and&#160;<code>../</code> prefixes to refer to the current folder, and containing folder, respectfully.</p><p>Since you must omit the asset domain prefix in order to specify a relative path, this only makes sense for components packaged in a library for reuse.</p><h3 id="Assets-SymbolsForAssets">Symbols For Assets</h3><p>Symbols inside the annotation value are expanded. This allows you to define a symbol and reference it as part of the path. For example, you could contribute a symbol named "skin.root" as "context:skins/basic" and then reference an asset from within it:</p><div class="code panel pdl" style="b
 order-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Inject
-@Path(&quot;${skin.root}/style.css&quot;)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Inject
+@Path("${skin.root}/style.css")
 private Asset style;
-]]></script>
-</div></div><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>The use of the <code>${...</code>} syntax here is a <em>symbol expansion</em> (because it occurs in an annotation in Java code), rather than a <em>template expansion</em> (which occurs only in Tapestry template files).</p></div></div><p>An override of the skin.root symbol would affect all references to the named asset.</p><h3 id="Assets-LocalizationofAssets">Localization of Assets</h3><p>Main Article: <a shape="rect" href="localization.html">Localization</a></p><p>Assets are localized; Tapestry will search for a variation of the file appropriate to the effective locale for the request. In the previous example, a German user of the application may see a file named <code>edit_de.png</code> (if such a file exists).</p><h3 id="Assets-NewAssetDomains">Ne
 w Asset Domains</h3><p>If you wish to create new domains for assets, for example to allow assets to be stored on the file system or in a database, you may define a new <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetFactory.html">AssetFactory</a> and contribute it to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetSource.html">AssetSource</a> service configuration.</p><h3 id="Assets-AssetFingerprinting(Tapestry5.3andearlier)">Asset Fingerprinting (Tapestry 5.3 and earlier)</h3><p>Tapestry creates a new URL for assets (whether context or classpath). The URL is of the form /assets/<strong>version</strong>/<strong>folder</strong>/<strong>path</strong>.</p><ul><li><strong>version</strong>: Application version number, defined by the <code>tapestry.application-version</code> symbol in your application module (normally AppModule.java). The 
 default is a random hex number.</li><li><strong>folder</strong>: Identifies the library containing the asset, or "ctx" for a context asset, or "stack" (used when combining multiple JavaScript files into a single virtual asset).</li><li><strong>path</strong>: The path below the root package of the library to the specific asset file.</li></ul><h3 id="Assets-AssetFingerprinting(Tapestry5.4andlater)">Asset Fingerprinting<span style="line-height: 1.5;">&#160;(Tapestry 5.4 and later)</span></h3><p>Tapestry 5.4 changes how Asset URLs are constructed, the version number is now a&#160;<em>content fingerprint</em>; it is a hash of the actual content of the asset.</p><p>Assets get a far-future expires header. It is no longer necessary or desirable to change the application version number.</p><p>During development or production, if an asset is changed in any way, it will have a new content fingerprint and will appear, to the browser, to be an entirely new immutable resource.</p><h3 id="Assets-C
 SSLinkRewriting">CSS Link Rewriting</h3><p>It is frequently the case that CSS files will include links to other files, such as background images, using the&#160;<code>url</code>() value syntax. Under 5.4, the URL for the CSS file and the targeted file be broken, due to the inclusions of the CSS file's content hash fingerprint. To fix this, Tapestry parses CSS files, locates the&#160;<code>url()</code> directives, and rewrites the URLs to be absolute (including the targeted file's content hash fingerprint).</p><h3 id="Assets-PerformanceNotes">Performance Notes</h3><p>Assets are expected to be entirely static (not changing while the application is deployed). This allows Tapestry to perform some important performance optimizations.</p><p>Tapestry GZIP compresses the content of all assets &#8211; if the asset is compressible, the client supports it, and you don't <a shape="rect" href="configuration.html#Configuration-tapestry.gzipcompressionenabled">explicitly disable it</a>.</p><p><spa
 n style="line-height: 1.4285715;">Further, the asset will get a </span><em style="line-height: 1.4285715;">far future expires header</em><span style="line-height: 1.4285715;">, which will encourage the client browser to cache the asset.</span></p><p>You should have an explicit application version number for any production application. Client browsers will aggressively cache downloaded assets; they will usually not even send a request to see if the asset has changed once the asset is downloaded the first time. Because of this it is <em>very important</em> that each new deployment of your application has a new <a shape="rect" href="configuration.html#Configuration-tapestry.applicationversion">version number</a>, to force existing clients to re-download all assets.</p><h3 id="Assets-AssetSecurity">Asset Security</h3><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></
 span><div class="confluence-information-macro-body"><p>This applies to how Tapestry 5.3 and earlier manage classpath assets; Tapestry 5.4 introduces another system which doesn't have this issue.</p></div></div><p>&#160;</p><p>Because Tapestry directly exposes files on the classpath to the clients, some thought has gone into ensuring that malicious clients are not able to download assets that should not be visible to them.</p><p>First off all, there's a package limitation: classpath assets are only visible if there's a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/LibraryMapping.html">LibraryMapping</a> for them, and the library mapping substitutes for the initial folders on the classpath. Since the most secure assets, things like <code>hibernate.cfg.xml</code> are located in the unnamed package, they are always off limits.</p><p>But what about other files on the classpath? Imagine this scenario:</p><ul><li>Your L
 ogin page exposes a classpath asset, <code>icon.png</code>.</li><li><p>A malicious client copies the URL, <code>/assets/1.0.0/app/pages/icon.png (</code><span style="line-height: 1.4285715;">which would indicate that the Login page is actually inside a library, which is unlikely. More likely, icon.png is a context asset and the malicious user guessed the path for Login.class by looking at the Tapestry source code.)&#160;</span><span style="line-height: 1.4285715;">and changes the file name to </span><code style="line-height: 1.4285715;">Login.class</code><span style="line-height: 1.4285715;">.</span></p></li><li><p>The client decompiles the class file and spots your secret emergency password: goodbye security! (<span style="line-height: 1.4285715;">Never create such back doors, of course!)</span></p></li></ul><p>Fortunately, this can't happen. Files with extension ".class" are secured; they must be accompanied in the URL with a query parameter that is the MD5 hash of the file's cont
 ents. If the query parameter is absent, or doesn't match the actual file's content, the request is rejected.</p><p>When your code exposes an Asset, the URL will automatically include the query parameter if the file type is secured. The malicious user is locked out of access to the files. (<span style="line-height: 1.4285715;">Unless they already have the files so that they can generate the MD5 checksum ... to get access to the files they already have.)</span></p><p>By default, Tapestry secures file extensions ".class', ".tml" and ".properties". The list can be extended by contributing to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ResourceDigestGenerator.html">ResourceDigestGenerator</a> service:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public static void contributeResourceDigestGenerator(Configuration&lt;String&gt; configuration)
+</pre>
+</div></div><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>The use of the <code>${...</code>} syntax here is a <em>symbol expansion</em> (because it occurs in an annotation in Java code), rather than a <em>template expansion</em> (which occurs only in Tapestry template files).</p></div></div><p>An override of the skin.root symbol would affect all references to the named asset.</p><h3 id="Assets-LocalizationofAssets">Localization of Assets</h3><p>Main Article: <a shape="rect" href="localization.html">Localization</a></p><p>Assets are localized; Tapestry will search for a variation of the file appropriate to the effective locale for the request. In the previous example, a German user of the application may see a file named <code>edit_de.png</code> (if such a file exists).</p><h3 id="Assets-NewAssetDomains">Ne
 w Asset Domains</h3><p>If you wish to create new domains for assets, for example to allow assets to be stored on the file system or in a database, you may define a new <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetFactory.html">AssetFactory</a> and contribute it to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetSource.html">AssetSource</a> service configuration.</p><h3 id="Assets-AssetFingerprinting(Tapestry5.3andearlier)">Asset Fingerprinting (Tapestry 5.3 and earlier)</h3><p>Tapestry creates a new URL for assets (whether context or classpath). The URL is of the form /assets/<strong>version</strong>/<strong>folder</strong>/<strong>path</strong>.</p><ul><li><strong>version</strong>: Application version number, defined by the <code>tapestry.application-version</code> symbol in your application module (normally AppModule.java). The 
 default is a random hex number.</li><li><strong>folder</strong>: Identifies the library containing the asset, or "ctx" for a context asset, or "stack" (used when combining multiple JavaScript files into a single virtual asset).</li><li><strong>path</strong>: The path below the root package of the library to the specific asset file.</li></ul><h3 id="Assets-AssetFingerprinting(Tapestry5.4andlater)">Asset Fingerprinting<span style="line-height: 1.5;">&#160;(Tapestry 5.4 and later)</span></h3><p>Tapestry 5.4 changes how Asset URLs are constructed, the version number is now a&#160;<em>content fingerprint</em>; it is a hash of the actual content of the asset.</p><p>Assets get a far-future expires header. It is no longer necessary or desirable to change the application version number.</p><p>During development or production, if an asset is changed in any way, it will have a new content fingerprint and will appear, to the browser, to be an entirely new immutable resource.</p><h3 id="Assets-C
 SSLinkRewriting">CSS Link Rewriting</h3><p>It is frequently the case that CSS files will include links to other files, such as background images, using the&#160;<code>url</code>() value syntax. Under 5.4, the URL for the CSS file and the targeted file be broken, due to the inclusions of the CSS file's content hash fingerprint. To fix this, Tapestry parses CSS files, locates the&#160;<code>url()</code> directives, and rewrites the URLs to be absolute (including the targeted file's content hash fingerprint).</p><h3 id="Assets-PerformanceNotes">Performance Notes</h3><p>Assets are expected to be entirely static (not changing while the application is deployed). This allows Tapestry to perform some important performance optimizations.</p><p>Tapestry GZIP compresses the content of all assets &#8211; if the asset is compressible, the client supports it, and you don't <a shape="rect" href="configuration.html">explicitly disable it</a>.</p><p><span style="line-height: 1.4285715;">Further, the
  asset will get a </span><em style="line-height: 1.4285715;">far future expires header</em><span style="line-height: 1.4285715;">, which will encourage the client browser to cache the asset.</span></p><p>You should have an explicit application version number for any production application. Client browsers will aggressively cache downloaded assets; they will usually not even send a request to see if the asset has changed once the asset is downloaded the first time. Because of this it is <em>very important</em> that each new deployment of your application has a new <a shape="rect" href="configuration.html">version number</a>, to force existing clients to re-download all assets.</p><h3 id="Assets-AssetSecurity">Asset Security</h3><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This applies to how Tapestry 5.3 
 and earlier manage classpath assets; Tapestry 5.4 introduces another system which doesn't have this issue.</p></div></div><p>&#160;</p><p>Because Tapestry directly exposes files on the classpath to the clients, some thought has gone into ensuring that malicious clients are not able to download assets that should not be visible to them.</p><p>First off all, there's a package limitation: classpath assets are only visible if there's a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/LibraryMapping.html">LibraryMapping</a> for them, and the library mapping substitutes for the initial folders on the classpath. Since the most secure assets, things like <code>hibernate.cfg.xml</code> are located in the unnamed package, they are always off limits.</p><p>But what about other files on the classpath? Imagine this scenario:</p><ul><li>Your Login page exposes a classpath asset, <code>icon.png</code>.</li><li><p>A malicious clien
 t copies the URL, <code>/assets/1.0.0/app/pages/icon.png (</code><span style="line-height: 1.4285715;">which would indicate that the Login page is actually inside a library, which is unlikely. More likely, icon.png is a context asset and the malicious user guessed the path for Login.class by looking at the Tapestry source code.)&#160;</span><span style="line-height: 1.4285715;">and changes the file name to </span><code style="line-height: 1.4285715;">Login.class</code><span style="line-height: 1.4285715;">.</span></p></li><li><p>The client decompiles the class file and spots your secret emergency password: goodbye security! (<span style="line-height: 1.4285715;">Never create such back doors, of course!)</span></p></li></ul><p>Fortunately, this can't happen. Files with extension ".class" are secured; they must be accompanied in the URL with a query parameter that is the MD5 hash of the file's contents. If the query parameter is absent, or doesn't match the actual file's content, the 
 request is rejected.</p><p>When your code exposes an Asset, the URL will automatically include the query parameter if the file type is secured. The malicious user is locked out of access to the files. (<span style="line-height: 1.4285715;">Unless they already have the files so that they can generate the MD5 checksum ... to get access to the files they already have.)</span></p><p>By default, Tapestry secures file extensions ".class', ".tml" and ".properties". The list can be extended by contributing to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ResourceDigestGenerator.html">ResourceDigestGenerator</a> service:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public static void contributeResourceDigestGenerator(Configuration&lt;String&gt; configuration)
 {
-    configuration.add(&quot;xyz&quot;);
+    configuration.add("xyz");
 }
-]]></script>
+</pre>
 </div></div><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Starting in Tapestry 5.4, there is a move to ensure that all assets are stored under&#160;<code>META-INF/assets</code>, rather than on the general classpath.</p><p>In Tapestry 5.5, assets on the general classpath will not be supported at all.</p></div></div><h3 id="Assets-MinimizingAssets">Minimizing Assets</h3><p>Since version 5.3, Tapestry provides a service, <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/assets/ResourceMinimizer.html">ResourceMinimizer</a>, which will help to minimize all your static resources (principally CSS and JavaScript files).</p><p>Minimization takes place before GZip compression. When aggregating JavaScript for a JavaScriptStack, the minimization is on
  the aggregated asset, not the individual assets being aggregated.</p><p>By default, this service does nothing. You should include a the&#160;tapestry-yuicompressor library (for Tapestry 5.3) or tapestry-webresources (for Tapestry 5.4), which makes it possible to minimize CSS and JavaScript files.</p><div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro"><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>For Tapestry 5.3: pom.xml (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;dependency&gt;
     &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
     &lt;artifactId&gt;tapestry-yuicompressor&lt;/artifactId&gt;
     &lt;version&gt;5.3.1&lt;/version&gt;
 &lt;/dependency&gt;
 
-]]></script>
+</pre>
 </div></div></div><div class="columnMacro"><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>For Tapestry 5.4: pom.xml (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;dependency&gt;
     &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
     &lt;artifactId&gt;tapestry-webresources&lt;/artifactId&gt;
     &lt;version&gt;5.4&lt;/version&gt;
 &lt;/dependency&gt;
-]]></script>
+</pre>
 </div></div></div></div></div></div><p>&#160;</p><p>By adding this dependency, all your JavaScript and CSS files will be minimized when <a shape="rect" href="configuration.html">PRODUCTION_MODE=true</a>. You can force the minimization of these files, by changing the value of the constant SymbolConstants.MINIFICATION_ENABLED in your module class (usually AppModule.java):</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(SymbolProvider.class)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Contribute(SymbolProvider.class)
 @ApplicationDefaults
 public static void contributeApplicationDefaults(MappedConfiguration&lt;String, String&gt; configuration)
 {
-    configuration.add(SymbolConstants.MINIFICATION_ENABLED, &quot;true&quot;);
+    configuration.add(SymbolConstants.MINIFICATION_ENABLED, "true");
 }
-]]></script>
+</pre>
 </div></div><p>If you want to add your own minimizer for particular types of assets, you can contribute to the ResourceMinimizer service. The service configuration maps the MIME-TYPE of your resource to an implementation of the ResourceMinimizer interface.</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(ResourceMinimizer.class)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Contribute(ResourceMinimizer.class)
 @Primary
 public static void contributeMinimizers(MappedConfiguration&lt;String, ResourceMinimizer&gt; configuration)
 {
-    configuration.addInstance(&quot;text/coffeescript&quot;, CoffeeScriptMinimizer.class);
+    configuration.addInstance("text/coffeescript", CoffeeScriptMinimizer.class);
 }
-]]></script>
+</pre>
 </div></div><p>&#160;</p><p>&#160;</p><p>&#160;</p></div>
 </div>