You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bu...@apache.org on 2015/04/22 04:19:35 UTC
svn commit: r948705 - in /websites/production/tapestry/content:
cache/main.pageCache legacy-javascript.html
Author: buildbot
Date: Wed Apr 22 02:19:35 2015
New Revision: 948705
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 Wed Apr 22 02:19:35 2015
@@ -99,7 +99,7 @@
<span class="icon icon-page" title="Page">Page:</span> </div>
<div class="details">
- <a shape="rect" href="javascript-modules.html">JavaScript Modules</a>
+ <a shape="rect" href="ajax-components-faq.html">Ajax Components FAQ</a>
</div>
@@ -108,7 +108,7 @@
<span class="icon icon-page" title="Page">Page:</span> </div>
<div class="details">
- <a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a>
+ <a shape="rect" href="javascript-faq.html">JavaScript FAQ</a>
</div>
@@ -117,7 +117,7 @@
<span class="icon icon-page" title="Page">Page:</span> </div>
<div class="details">
- <a shape="rect" href="ajax-components-faq.html">Ajax Components FAQ</a>
+ <a shape="rect" href="client-side-javascript.html">Client-Side JavaScript</a>
</div>
@@ -126,7 +126,7 @@
<span class="icon icon-page" title="Page">Page:</span> </div>
<div class="details">
- <a shape="rect" href="javascript-faq.html">JavaScript FAQ</a>
+ <a shape="rect" href="assets.html">Assets</a>
</div>
@@ -135,7 +135,7 @@
<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>
+ <a shape="rect" href="component-cheat-sheet.html">Component Cheat Sheet</a>
</div>
@@ -144,7 +144,16 @@
<span class="icon icon-page" title="Page">Page:</span> </div>
<div class="details">
- <a shape="rect" href="assets.html">Assets</a>
+ <a shape="rect" href="javascript-modules.html">JavaScript Modules</a>
+
+
+ </div>
+ </li><li>
+ <div>
+ <span class="icon icon-page" title="Page">Page:</span> </div>
+
+ <div class="details">
+ <a shape="rect" href="coffeescript.html">CoffeeScript</a>
</div>
@@ -194,7 +203,7 @@ public class MyComponent
</div></div></div></div></div></div><p>Tapestry will ensure that the necessary <link> elements are added to the <em>top</em> of the document (in the <head> element). With Tapestry 5.3 and later the new elements are inserted at the bottom of the <head> element; in versions before 5.3 they appear at the top of the <head> element).</p><p>As with the annotation approach, adding the same asset multiple times does <em>not</em> create duplicate links.</p><p>The <code>setupRender</code> method (the name is specifically linked to a <a shape="rect" href="component-rendering.html">render phase</a>) is the correct place to inform the JavaScriptSupport (or RenderSupport) service that the library is needed.</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/reusable" >Reusable JavaScript</a> </p></div><h3 id="LegacyJavaScript-TheaddScriptmethod">The <code>addScript</code> method</h3><p>The <code>addScript</code> method is used when you need to add some JavaScript code directly to the page. This will be inserted at the <em>bottom of the document</em>, and will only be executed when the document has finished loading on the client (i.e., from the window.onload event handler).</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>Tapestry 5.2 and later</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[void afterRender()
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[void afterRender()
{
javaScriptSupport.addScript(
"$('%s').observe('click', hideMe());",
@@ -202,7 +211,7 @@ public class MyComponent
}
]]></script>
</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>Tapestry 5.1 and earlier</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[void afterRender()
+<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[void afterRender()
{
javaScriptSupport.addScript(String.format(
"$('%s').observe('click', hideMe());",
@@ -310,7 +319,7 @@ public class MyComponent
</div></div><h1 id="LegacyJavaScript-AjaxComponentsandMixins">Ajax Components and Mixins</h1><p>Tapestry provides easy-to-use support for <em>Ajax</em>, the technique of using JavaScript to dynamically updating parts of a web page with content from the server without redrawing the whole page. See <a shape="rect" href="ajax-and-zones.html">Ajax and Zones</a> for details.</p><h1 id="LegacyJavaScript-Built-inLibraries">Built-in Libraries</h1><div class="navmenu" style="float:right; width:30%; background:#eee; margin:3px; padding:3px">
<p><font color="green"><strong>Alternatives to Prototype</strong></font><br clear="none">
Tapestry also works well with other JavaScript libraries, such as JQuery and ExtJS:</p>
-<ul><li><strong><a shape="rect" class="external-link" href="https://github.com/got5/tapestry5-jquery" >Tapestry5-Jquery module</a></strong> – Using JQuery <em>instead of</em> Prototype</li><li><a shape="rect" class="external-link" href="http://wiki.apache.org/tapestry/Tapestry5HowToIntegrateJQuery">Tapestry5HowToIntegrateJQuery</a> – Using JQuery <em>in addition to</em> Prototype</li><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/TAP5-999">TAP5-999</a> tracks work underway to introduce an agnostic tapestry.js layer to allow switching from Prototype to JQuery. See <a shape="rect" href="javascript-rewrite.html" title="JavaScript Rewrite">JavaScript Rewrite</a> for more info.</li><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/TAP5-1364">TAPS-1364</a> lists some starting points for ExtJS integration</li></ul>
+<ul><li><strong><a shape="rect" class="external-link" href="https://github.com/got5/tapestry5-jquery" >Tapestry5-Jquery module</a></strong> – Using JQuery <em>instead of</em> Prototype</li><li><a shape="rect" class="external-link" href="http://wiki.apache.org/tapestry/Tapestry5HowToIntegrateJQuery">Tapestry5HowToIntegrateJQuery</a> – Using JQuery <em>in addition to</em> Prototype</li><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/TAP5-999">TAP5-999</a> tracks work underway to introduce an agnostic tapestry.js layer to allow switching from Prototype to JQuery. See <span class="error">[JavaScript Rewrite]</span> for more info.</li><li><a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/TAP5-1364">TAPS-1364</a> lists some starting points for ExtJS integration</li></ul>
</div><p>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 ... no extra download is required. Tapestry will automatically link into your pages the prototype.js, scriptaculous.js, and effects.js libraries, as well as the Tapestry library, tapestry.js (which largely consists of support for form input validation). Starting with Tapestry 5.3, <a shape="rect" class="external-link" href="http://documentcloud.github.com/underscore/" >Underscore</a> is also included.</p><h2 id="LegacyJavaScript-PrototypeandScriptaculousVersions">Prototype and Scriptaculous Versions</h2><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry 5.3.5</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Prototype 1.7.1</p></td><td colspan="1" rowspan="1" class="confluenceTd"
><p>Scriptaculous 1.9</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Underscore 1.1.7</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry 5.3+</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Prototype 1.7</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Scriptaculous 1.9</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Underscore 1.1.7</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry 5.2.6</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Prototype 1.7</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Scriptaculous 1.9</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry 5.2</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Prototype 1.6.1</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Scriptaculous 1.8.2</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry 5.1</p></th><td colspan="1" rowspa
n="1" class="confluenceTd"><p>Prototype 1.6.0.3</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Scriptaculous 1.8.2</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Tapestry 5.0</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Prototype 1.6.0</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Scriptaculous 1.8.0</p></td></tr></tbody></table></div><p>Tapestry uses a modified version of the main Scriptaculous library, scriptaculous.js, with the library's default <a shape="rect" class="external-link" href="http://wiki.script.aculo.us/scriptaculous/show/Usage" >autoloading</a> behavior turned off. This lets Tapestry and Tapestry components control which Scriptaculus scripts are loaded, rather than having <em>all</em> of them loaded unnecessarily.</p><p>If you need access to other Scriptaculous libraries, you can provide them as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ @Inject @Path("${tapestry.scriptaculous}/dragdrop.js")
private Asset dragDropLibrary;