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 2017/02/26 00:19:58 UTC
svn commit: r1007309 - in /websites/production/tapestry/content: assets.html
cache/main.pageCache
Author: buildbot
Date: Sun Feb 26 00:19:58 2017
New Revision: 1007309
Log:
Production update by buildbot for tapestry
Modified:
websites/production/tapestry/content/assets.html
websites/production/tapestry/content/cache/main.pageCache
Modified: websites/production/tapestry/content/assets.html
==============================================================================
--- websites/production/tapestry/content/assets.html (original)
+++ websites/production/tapestry/content/assets.html Sun Feb 26 00:19:58 2017
@@ -99,7 +99,7 @@
</div>
<div class="details">
<a href="legacy-javascript.html">Legacy JavaScript</a>
- </div> </li></ul></div><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 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 href="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">
+ </div> </li></ul></div><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 a project following Maven's directory layout conventions, this would be src/main/webapp or a subdirectory of it (but <em>not</em> under src/main/webapp/WEB-INF) 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 available to your code as instances of the <a 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 href="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 t
he "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;"><img src="${asset:context:image/tapestry_banner.gif}" alt="Banner"/>
</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">
Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.