Author: buildbot
Date: Sun Nov 9 20:20:35 2014
New Revision: 928524
Log:
Production update by buildbot for tapestry
Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/legacy-javascript.html
Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/tapestry/content/legacy-javascript.html
==============================================================================
--- websites/production/tapestry/content/legacy-javascript.html (original)
+++ websites/production/tapestry/content/legacy-javascript.html Sun Nov 9
20:20:35 2014
@@ -78,7 +78,7 @@
<span class="icon icon-page" title="Page">Page:</span>
</div>
<div class="details">
- <a shape="rect"
href="legacy-javascript.html">Legacy JavaScript</a>
+ <a shape="rect" href="ajax-and-zones.html">Ajax
and Zones</a>
</div>
@@ -87,7 +87,7 @@
<span class="icon icon-page" title="Page">Page:</span>
</div>
<div class="details">
- <a shape="rect" href="ajax-and-zones.html">Ajax
and Zones</a>
+ <a shape="rect"
href="legacy-javascript.html">Legacy JavaScript</a>
</div>
@@ -128,14 +128,14 @@
</div>
</li></ul>
-</div><p> </p><p> </p><p><strong>JavaScript</strong> is a
first-class concept in Tapestry, and sophisticated JavaScript support is
provided right out of the box, including rich <a shape="rect"
href="ajax-and-zones.html">AJAX support</a>, download optimization, client-side
logging, and localization.</p><p>In production mode, by default, Tapestry will
merge JavaScript libraries, add version numbering, and set a far-future expires
header to encourage aggressive browser caching. Starting with version 5.3,
Tapestry can also automatically minify (compress) JavaScript libraries when in
<a shape="rect"
href="configuration.html#Configuration-Configuration-ConfigurationSymbolNames">production
mode</a>.</p><p>In addition, as will be described in detail <a shape="rect"
href="#LegacyJavaScript-Built-inLibraries">below</a>, Tapestry comes with the
<a shape="rect" class="external-link" href="http://www.prototypejs.org/"
>Prototype</a> and <a shape="rect" class="external-link" href="http:
//script.aculo.us/" >Scriptaculous</a> libraries, or you can easily swap in
JQuery using a 3rd-party module.</p> <div class="aui-message problem
shadowed information-macro">
+</div> <div class="aui-message problem shadowed information-macro">
<p class="title">For Older Versions of Tapestry</p>
<span class="aui-icon icon-problem">Icon</span>
<div class="message-content">
- <p>This page describes the state of Tapestry prior
to Tapestry 5.4; in 5.4, all client-side JavaScript was rewritten from the
ground up. This page exists to provide documentation for people working with
<em>legacy</em> applications, not yet upgraded to Tapestry 5.4.</p>
+ <p>This page describes the state of Tapestry up
through version 5.3.x. For version 5.4, see <a shape="rect"
href="client-side-javascript.html">Client-Side JavaScript</a>.</p>
</div>
</div>
-<h1 id="LegacyJavaScript-AddingCustomJavaScript">Adding Custom
JavaScript</h1><p>When adding your own custom JavaScript or third-party
libraries, just follow the strategies below to take advantage of Tapestry's
JavaScript support mechanisms.</p><p>The recommended practice in Tapestry is to
package up any significant amount of JavaScript as a static JavaScript library,
a .js file that can be downloaded to the client. Keep your in-page JavaScript
code to a minimum, just the few statements needed to initialize objects and
reference methods in the JavaScript libraries.</p><h2
id="LegacyJavaScript-LinkingtoyourJavaScriptlibraries">Linking to your
JavaScript libraries</h2><p>Tapestry provides several ways to add a link to a
JavaScript library within your page or component. Although you can use direct
<code><script type="text/javascript" src="xxx.js"></script></code>
approach, you should only use it for JavaScript that resides outside of your
application. For JavaScript within
your app, Tapestry provides <em>much</em> better ways to do the same thing.
Most users choose the simplest, the @Import annotation approach.</p><div
class="navmenu" style="float:right; background:#eee; margin:3px; padding:0 1em">
+<p> </p><p><strong>JavaScript</strong> is a first-class concept in
Tapestry, and sophisticated JavaScript support is provided right out of the
box, including rich <a shape="rect" href="ajax-and-zones.html">AJAX
support</a>, download optimization, client-side logging, and
localization.</p><p>In production mode, by default, Tapestry will merge
JavaScript libraries, add version numbering, and set a far-future expires
header to encourage aggressive browser caching. Starting with version 5.3,
Tapestry can also automatically minify (compress) JavaScript libraries when in
<a shape="rect"
href="configuration.html#Configuration-Configuration-ConfigurationSymbolNames">production
mode</a>.</p><p>In addition, as will be described in detail <a shape="rect"
href="#LegacyJavaScript-Built-inLibraries">below</a>, Tapestry comes with the
<a shape="rect" class="external-link" href="http://www.prototypejs.org/"
>Prototype</a> and <a shape="rect" class="external-link"
href="http://script.aculo.us/"
>Scriptaculous</a> libraries, or you can easily swap in JQuery using a
3rd-party module.</p><h1 id="LegacyJavaScript-AddingCustomJavaScript">Adding
Custom JavaScript</h1><p>When adding your own custom JavaScript or third-party
libraries, just follow the strategies below to take advantage of Tapestry's
JavaScript support mechanisms.</p><p>The recommended practice in Tapestry is to
package up any significant amount of JavaScript as a static JavaScript library,
a .js file that can be downloaded to the client. Keep your in-page JavaScript
code to a minimum, just the few statements needed to initialize objects and
reference methods in the JavaScript libraries.</p><h2
id="LegacyJavaScript-LinkingtoyourJavaScriptlibraries">Linking to your
JavaScript libraries</h2><p>Tapestry provides several ways to add a link to a
JavaScript library within your page or component. Although you can use direct
<code><script type="text/javascript" src="xxx.js"></script></code>
approach, you shoul
d only use it for JavaScript that resides outside of your application. For
JavaScript within your app, Tapestry provides <em>much</em> better ways to do
the same thing. Most users choose the simplest, the @Import annotation
approach.</p><div class="navmenu" style="float:right; background:#eee;
margin:3px; padding:0 1em">
<p><strong>JumpStart Demo:</strong> <br clear="none">
<a shape="rect" class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript"
>JavaScript</a> </p></div><h2 id="LegacyJavaScript-Approach1:@Import">Approach
1: @Import</h2><p>Use the @<a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Import.html">Import</a>
annotation (or @<a shape="rect" class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/IncludeJavaScriptLibrary.html">IncludeJavaScriptLibrary</a>
in Tapestry 5.0 and 5.1) to include links to JavaScript (and CSS) files in
your page or component. Tapestry ensures that each such file is only referenced
once in your page.</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.2 and later</b></div><div class="codeContent panelContent pdl">
<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[@Import(library={"context:js/jquery.js",