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 2014/11/10 04:21:03 UTC

svn commit: r928561 - in /websites/production/tapestry/content: cache/main.pageCache legacy-javascript.html

Author: buildbot
Date: Mon Nov 10 03:21:02 2014
New Revision: 928561

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 Mon Nov 10 03:21:02 2014
@@ -71,7 +71,14 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
+<div id="ConfluenceContent"><p>&#160;</p><p>&#160;</p>    <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 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>
+<p>&#160;</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><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
 <h3>Related Articles</h3>
 <ul class="content-by-label"><li>
             <div>
@@ -127,15 +134,17 @@
                     
                 
                             </div>
+        </li><li>
+            <div>
+                    <span class="icon icon-page" title="Page">Page:</span>            </div>
+
+            <div class="details">
+                            <a shape="rect" href="client-side-javascript.html">Client-Side JavaScript</a>
+                    
+                
+                            </div>
         </li></ul>
-</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 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>
-<p>&#160;</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>&lt;script type="text/javascript" src="xxx.js"&gt;&lt;/script&gt;</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">
+</div><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="LegacyJavaScri
 pt-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>&lt;script type="text/javascript" src="xxx.js"&gt;&lt;/script&gt;</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><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={&quot;context:js/jquery.js&quot;,