tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r946273 - in /websites/production/tapestry/content: cache/main.pageCache templating-and-markup-faq.html
Date Sat, 04 Apr 2015 03:20:43 GMT
Author: buildbot
Date: Sat Apr  4 03:20:42 2015
New Revision: 946273

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/cache/main.pageCache
    websites/production/tapestry/content/templating-and-markup-faq.html

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

Modified: websites/production/tapestry/content/templating-and-markup-faq.html
==============================================================================
--- websites/production/tapestry/content/templating-and-markup-faq.html (original)
+++ websites/production/tapestry/content/templating-and-markup-faq.html Sat Apr  4 03:20:42
2015
@@ -107,7 +107,7 @@ table.ScrollbarTable td.ScrollbarNextIco
 </div></div><p>The other id is the client id, a unique id for the rendered
element within the client-side DOM. JavaScript that needs to access the element uses this
id. For example:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[
 $(&#39;status&#39;).hide();
 ]]></script>
-</div></div><p>In many components, the <code>id</code> attribute
is an informal parameter; a value from the template that is blindly echoed into the output
document. In other cases, the component itself has an <code>id</code> attribute.
Often, in the latter case, the Tapestry component id is the <em>default</em> value
for the client id.</p><h3 id="TemplatingandMarkupFAQ-WhydomyimagesandstylesheetsendupwithaweirdURLslike/assets/meta/zeea17aee26bc0cae/layout/layout.css?">Why
do my images and stylesheets end up with a weird URLs like <code>/assets/meta/zeea17aee26bc0cae/layout/layout.css</code>?</h3><p>Tapestry
doesn't rely on the servlet container to serve up your static assets (images, stylesheets,
flash movies, etc.). Instead, Tapestry processes the requests itself, streaming assets to
the browser.</p><p>Asset content will be GZIP compressed (if the client supports
compression, and the content is compressible). In addition, Tapestry will set a far-future
expires header on the conten
 t. This means that the browser will not ask for the file again, greatly reducing network
traffic.</p><p>The weird hex string is a&#160;<em>fingerprint</em>;
it is a hash code computed from the actual content of the asset. If the asset every changes,
it will have a new fingerprint, and so will be a new path and a new (immutable) resource.
This approach, combined with a far-future expires header also provided by Tapestry, ensures
that clients aggressively cache assets as they navigate your site, or even between visits.</p><p><span
style="color: rgb(83,145,38);font-size: 16.0px;line-height: 1.5625;">How do I add a CSS
class to a Tapestry component?</span></p><p>As they say, "just do it". The
majority of Tapestry components support <em>informal parameters</em>, meaning
that any extra attributes in the element (in the template) will be rendered out as additional
attributes. So, you can apply a CSS class or style quite easily:</p><div class="code
panel pdl" style="border-width: 1px;"><div
  class="codeContent panelContent pdl">
+</div></div><p>In many components, the <code>id</code> attribute
is an informal parameter; a value from the template that is blindly echoed into the output
document. In other cases, the component itself has an <code>id</code> attribute.
Often, in the latter case, the Tapestry component id is the <em>default</em> value
for the client id.</p><h3 id="TemplatingandMarkupFAQ-WhydomyimagesandstylesheetsendupwithaweirdURLslike/assets/meta/zeea17aee26bc0cae/layout/layout.css?">Why
do my images and stylesheets end up with a weird URLs like <code>/assets/meta/zeea17aee26bc0cae/layout/layout.css</code>?</h3><p>Tapestry
doesn't rely on the servlet container to serve up your static assets (images, stylesheets,
flash movies, etc.). Instead, Tapestry processes the requests itself, streaming assets to
the browser.</p><p>Asset content will be GZIP compressed (if the client supports
compression, and the content is compressible). In addition, Tapestry will set a far-future
expires header on the conten
 t. This means that the browser will not ask for the file again, greatly reducing network
traffic.</p><p>The weird hex string is a&#160;<em>fingerprint</em>;
it is a hash code computed from the actual content of the asset. If the asset ever changes,
it will have a new fingerprint, and so will be a new path and a new (immutable) resource.
This approach, combined with a far-future expires header also provided by Tapestry, ensures
that clients aggressively cache assets as they navigate your site, or even between visits.</p><p><span
style="color: rgb(83,145,38);font-size: 16.0px;line-height: 1.5625;">How do I add a CSS
class to a Tapestry component?</span></p><p>As they say, "just do it". The
majority of Tapestry components support <em>informal parameters</em>, meaning
that any extra attributes in the element (in the template) will be rendered out as additional
attributes. So, you can apply a CSS class or style quite easily:</p><div class="code
panel pdl" style="border-width: 1px;"><div 
 class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;t:textfield t:id=&quot;username&quot; class=&quot;big-green&quot;/&gt;
 ]]></script>
 </div></div><p>You can even use template expansions inside the attribute
value:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">



Mime
View raw message