Modified: websites/production/tapestry/content/ioc-cookbook.html ============================================================================== --- websites/production/tapestry/content/ioc-cookbook.html (original) +++ websites/production/tapestry/content/ioc-cookbook.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">IoC cookbook</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">IoC cookbook</h1></div></div> <div class="clearer"></div> </div> @@ -69,55 +64,31 @@ </div> <div id="content"> - <div id="ConfluenceContent"><p>Tapestry <strong>Inversion of Control</strong> (IoC), though originally designed specifically for the needs of the Tapestry web framework, may also be employed as a stand-alone IoC container, separate from the rest of Tapestry.</p><div class="aui-label" style="float:right" title="Related Articles"> - - - - - - - - -<h3>Related Articles</h3> - -<ul class="content-by-label"><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="ioc.html">IOC</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="ioc-cookbook.html">IoC cookbook</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="tapestry-ioc-overview.html">Tapestry IoC Overview</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="tapestry-inversion-of-control-faq.html">Tapestry Inversion of Control FAQ</a> - - - </div> - </li></ul> -</div><p>Tapestry IoC is a sophisticated tool that takes some experience to use properly.</p><p>The IOC documentation in the User Guide is factually correct, but it is designed more as a reference, rather than giving the big picture. In this Cookbook, we'll show a bit more about how to use Tapestry IoC, using real examples from the Tapestry code base (both the tapestry-ioc and tapestry-core modules).</p><p>A word of caution: several of the examples have been taken from Tapestry's <em>internal</em> code base. Tapestry internals are private, subject to change at any time, so be aware that if you go peeking at the internal source code, it may have changed since the corresponding documentation was written.</p><p><strong>Contents:</strong></p><ul><li><a href="ioc-cookbook-basic-services-and-injection.html">Basic Services and Injection</a></li><li><a href="ioc-cookbook-overriding-ioc-services.html">Overriding Tapestry IoC Services</a></li><li><a href="ioc-cookbook-patterns.html">Using Patterns</a></li><li><a href="ioc-cookbook-service-configurations.html">Service Configurations</a></li></ul></div> + <div id="ConfluenceContent"><p>Tapestry <strong>Inversion of Control</strong> (IoC), though originally designed specifically for the needs of the Tapestry web framework, may also be employed as a stand-alone IoC container, separate from the rest of Tapestry.</p><div class="aui-label" style="float:right" title="Related Articles"><h3>Related Articles</h3><ul class="content-by-label"><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="ioc.html">IOC</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="ioc-cookbook.html">IoC cookbook</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="tapestry-ioc-overview.html">Tapestry IoC Overview</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="tapestry-inversion-of-control-faq.html">Tapestry Inversion of Control FAQ</a> + </div> </li></ul></div><p>Tapestry IoC is a sophisticated tool that takes some experience to use properly.</p><p>The IOC documentation in the User Guide is factually correct, but it is designed more as a reference, rather than giving the big picture. In this Cookbook, we'll show a bit more about how to use Tapestry IoC, using real examples from the Tapestry code base (both the tapestry-ioc and tapestry-core modules).</p><p>A word of caution: several of the examples have been taken from Tapestry's <em>internal</em> code base. Tapestry internals are private, subject to change at any time, so be aware that if you go peeking at the internal source code, it may have changed since the corresponding documentation was written.</p><p><strong>Contents:</strong></p><ul><li><a href="ioc-cookbook-basic-services-and-injection.html">Basic Services and Injection</a></li><li><a href="ioc-cookbook-overriding-ioc-services.html">Overriding Tapestry IoC Services</a></li><li><a href="ioc-cookbook-pa tterns.html">Using Patterns</a></li><li><a href="ioc-cookbook-service-configurations.html">Service Configurations</a></li></ul></div> </div> <div class="clearer"></div>
Modified: websites/production/tapestry/content/javascript-faq.html ============================================================================== --- websites/production/tapestry/content/javascript-faq.html (original) +++ websites/production/tapestry/content/javascript-faq.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">JavaScript FAQ</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">JavaScript FAQ</h1></div></div> <div class="clearer"></div> </div> Modified: websites/production/tapestry/content/legacy-javascript.html ============================================================================== --- websites/production/tapestry/content/legacy-javascript.html (original) +++ websites/production/tapestry/content/legacy-javascript.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Legacy JavaScript</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Legacy JavaScript</h1></div></div> <div class="clearer"></div> </div> @@ -69,100 +64,61 @@ </div> <div id="content"> - <div id="ConfluenceContent"><div class="confluence-information-macro confluence-information-macro-warning"><p class="title">For Older Versions of Tapestry</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This page describes JavaScript usage in Tapestry versions up through 5.3.x. For version 5.4 and later, see <a href="client-side-javascript.html">Client-Side JavaScript</a>.</p></div></div><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 href="ajax-and-zones.html">AJAX support</a>, download optimization, client-side logging, and localization.</p><div class="aui-label" style="float:right" title="Related Articles"> - - - - - - - - -<h3>Related Articles</h3> - -<ul class="content-by-label"><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="ajax-and-zones.html">Ajax and Zones</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="legacy-javascript.html">Legacy JavaScript</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="coffeescript.html">CoffeeScript</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="client-side-javascript.html">Client-Side JavaScript</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="javascript-modules.html">JavaScript Modules</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="javascript-faq.html">JavaScript FAQ</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="ajax-components-faq.html">Ajax Components FAQ</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="component-cheat-sheet.html">Component Cheat Sheet</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="assets.html">Assets</a> - - - </div> - </li></ul> -</div><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 href="configuration.html">production mode</a>.</p><p>In addition, as will be described in detail <a href="legacy-javascript.html">below</a>, Tapestry comes with the <a class="external-link" href="http://www.prototypejs.org/" rel="nofollow">Prototype</a> and <a class="external-link" href="http://script.aculo.us/" rel="nofollow">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 Tapes try 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"> + <div id="ConfluenceContent"><div class="confluence-information-macro confluence-information-macro-warning"><p class="title">For Older Versions of Tapestry</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This page describes JavaScript usage in Tapestry versions up through 5.3.x. For version 5.4 and later, see <a href="client-side-javascript.html">Client-Side JavaScript</a>.</p></div></div><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 href="ajax-and-zones.html">AJAX support</a>, download optimization, client-side logging, and localization.</p><div class="aui-label" style="float:right" title="Related Articles"><h3>Related Articles</h3><ul class="content-by-label"><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="ajax-and-zones.html">Ajax and Zones</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="legacy-javascript.html">Legacy JavaScript</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="coffeescript.html">CoffeeScript</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="client-side-javascript.html">Client-Side JavaScript</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="javascript-modules.html">JavaScript Modules</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="javascript-faq.html">JavaScript FAQ</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="ajax-components-faq.html">Ajax Components FAQ</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="component-cheat-sheet.html">Component Cheat Sheet</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="assets.html">Assets</a> + </div> </li></ul></div><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 href="configuration.html">production mode</a>.</p><p>In addition, as will be described in detail <a href="legacy-javascript.html">below</a>, Tapestry comes with the <a class="external-link" href="http://www.prototypejs.org/" rel="nofollow">Prototype</a> and <a class="external-link" href="http://script.aculo.us/" rel="nofollow">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 recommende d 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><strong>JumpStart Demo:</strong> <br clear="none"> <a class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript" rel="nofollow">JavaScript</a> </p></div><h2 id="LegacyJavaScript-Approach1:@Import">Approach 1: @Import</h2><p>Use the @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Import.html">Import</a> annotation (or @<a 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 late r</b></div><div class="codeContent panelContent pdl"> <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Import(library={"context:js/jquery.js", @@ -254,13 +210,11 @@ public class MyComponent <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.1.0.2</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> </div></div> -<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"> -<p> </p></div><p>In production mode, Tapestry automatically <em>combines</em> JavaScript libraries. A single request (for a <em>virtual asset</em>) will retrieve the combined content of all referenced JavaScript library files.</p><p>Note: starting with Tapestry 5.2, JavaScript libraries are only combined if they are part of a JavaScript Stack (see below).</p><p>This is a very useful feature, as it reduces the number of requests needed to present a page to the user. It can be disabled, however, by setting the SymbolConstants.COMBINE_SCRIPTS <a href="configuration.html">configuration symbol</a> to false in your application's module class (normally AppModule.java). By default it is enabled when in production mode and disabled otherwise.</p><p>As elsewhere, if the client browser supports gzip compression, the combined JavaScript will be compressed.</p><h1 id="LegacyJavaScript-MinifyingJavaScriptlibraries">Minifying JavaScript libraries</h1> +<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"><p> </p></div><p>In production mode, Tapestry automatically <em>combines</em> JavaScript libraries. A single request (for a <em>virtual asset</em>) will retrieve the combined content of all referenced JavaScript library files.</p><p>Note: starting with Tapestry 5.2, JavaScript libraries are only combined if they are part of a JavaScript Stack (see below).</p><p>This is a very useful feature, as it reduces the number of requests needed to present a page to the user. It can be disabled, however, by setting the SymbolConstants.COMBINE_SCRIPTS <a href="configuration.html">configuration symbol</a> to false in your application's module class (normally AppModule.java). By default it is enabled when in production mode and disabled otherwise.</p><p>As elsewhere, if the client browser supports gzip compression, the combined JavaScript will be compressed.</p><h1 id="LegacyJavaScript-MinifyingJavaScriptlibrarie s">Minifying JavaScript libraries</h1> <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.3</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> </div></div> -<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"> -<p> </p></div><p>In production mode, Tapestry can automatically <em>minify</em> (intelligently compresses) JavaScript libraries (and CSS) when the application starts up. This can significantly decrease the size of static content that the browser needs to download.</p><p>Minification is accomplished using the ResourceMinimizer service. A YUI Compressor-based implementation is available, but this can be overridden.</p><p>IMPORTANT NOTE: The tapestry-core module only provides the empty infrastructure for supporting minification; the actual logic is supplied in the tapestry-yuicompressor module. To use it, you'll need to update your dependencies to include this module.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Maven pom.xml (partial)</b></div><div class="codeContent panelContent pdl"> +<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"><p> </p></div><p>In production mode, Tapestry can automatically <em>minify</em> (intelligently compresses) JavaScript libraries (and CSS) when the application starts up. This can significantly decrease the size of static content that the browser needs to download.</p><p>Minification is accomplished using the ResourceMinimizer service. A YUI Compressor-based implementation is available, but this can be overridden.</p><p>IMPORTANT NOTE: The tapestry-core module only provides the empty infrastructure for supporting minification; the actual logic is supplied in the tapestry-yuicompressor module. To use it, you'll need to update your dependencies to include this module.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Maven pom.xml (partial)</b></div><div class="codeContent panelContent pdl"> <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-yuicompressor</artifactId> @@ -271,8 +225,7 @@ public class MyComponent <div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Deprecated since 5.3</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> </div></div> -<div style="border-right: 20px solid #ffcccc;border-left: 20px solid #ffcccc;"> -<p> </p></div><p>In versions prior to 5.3, Tapestry uses a modified version of the <a class="external-link" href="http://www.gscottolson.com/blackbirdjs/" rel="nofollow">Blackbird</a> JavaScript console. The Tapestry object includes three functions: debug, warn and error.</p><p>Each of these functions take a message and an optional pattern; if the pattern is provided, the message is <a class="external-link" href="http://prototypejs.org/api/string/interpolate" rel="nofollow">interpolated</a> on the pattern. The final message is displayed in the Blackbird console, which will make itself visible automatically.</p><p>In production mode, debug messages will be filtered out (they will not be visible until the user presses F2 to display the console, and then clicks the grayed out icon for debug messages). In development mode, debug messages are not filtered out.</p><p>Example usage:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div style="border-right: 20px solid #ffcccc;border-left: 20px solid #ffcccc;"><p> </p></div><p>In versions prior to 5.3, Tapestry uses a modified version of the <a class="external-link" href="http://www.gscottolson.com/blackbirdjs/" rel="nofollow">Blackbird</a> JavaScript console. The Tapestry object includes three functions: debug, warn and error.</p><p>Each of these functions take a message and an optional pattern; if the pattern is provided, the message is <a class="external-link" href="http://prototypejs.org/api/string/interpolate" rel="nofollow">interpolated</a> on the pattern. The final message is displayed in the Blackbird console, which will make itself visible automatically.</p><p>In production mode, debug messages will be filtered out (they will not be visible until the user presses F2 to display the console, and then clicks the grayed out icon for debug messages). In development mode, debug messages are not filtered out.</p><p>Example usage:</p><div class="code pa nel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> Tapestry.debug("Field id is #{id}, value is #{value}", field); Tapestry.error("Server is not available."); @@ -285,8 +238,7 @@ public class MyComponent <div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Deprecated since 5.2 (no replacement)</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> </div></div> -<div style="border-right: 20px solid #ffcccc;border-left: 20px solid #ffcccc;"> -<p> </p></div><p>The standard library adds a new function, <code>$T()</code>. This function is used much like Prototype's <code>$()</code>, except that instead of returning a DOM object, it returns a hash (an initially empty JavaScript object) that is associated with the DOM object. This hash is known as <em>the Tapestry object</em>.</p><p>You may pass in an object id (as a string) or an object reference. The Tapestry Object is created on first invocation. Note: you'll see it as a property name _tapestry on the DOM object (which may be useful when debugging).</p><p>When Tapestry adds information to a DOM object, it does so in the Tapestry object. This helps avoid name conflicts, and groups all Tapestry-added properties into one place which is much easier to debug.</p><p>For example, you might store a value for an element in one place:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div style="border-right: 20px solid #ffcccc;border-left: 20px solid #ffcccc;"><p> </p></div><p>The standard library adds a new function, <code>$T()</code>. This function is used much like Prototype's <code>$()</code>, except that instead of returning a DOM object, it returns a hash (an initially empty JavaScript object) that is associated with the DOM object. This hash is known as <em>the Tapestry object</em>.</p><p>You may pass in an object id (as a string) or an object reference. The Tapestry Object is created on first invocation. Note: you'll see it as a property name _tapestry on the DOM object (which may be useful when debugging).</p><p>When Tapestry adds information to a DOM object, it does so in the Tapestry object. This helps avoid name conflicts, and groups all Tapestry-added properties into one place which is much easier to debug.</p><p>For example, you might store a value for an element in one place:</p><div class="code panel pdl" style="border-width: 1px;"><div cla ss="codeContent panelContent pdl"> <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> $T(myid).fadeDuration = .5; </pre> </div></div><p>Then use it somewhere else:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> @@ -313,8 +265,7 @@ Tapestry also works well with other Java <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> </div></div> -<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"> -<p> </p></div><p>Tapestry allows you to define groups of related JavaScript libraries and stylesheets as "stacks". The built-in "core" stack is used to define the core JavaScript libraries needed by Tapestry (currently, this includes Prototype and Scriptaculous, as well as Tapestry-specific libraries). Other component libraries may define additional stacks for related sets of resources, for example, to bundle together some portion of the ExtJS or YUI libraries.</p><p>A <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptStack.html">JavaScriptStack</a> can be thought of as a generalization of Tapestry 5.1's ClientInfrastructure, which exists now to define the "core" JavaScript stack.</p><p>JavaScript assets of a stack may (when enabled) be exposed to the client as a single URL (identifying the stack by name). The individual assets are combined into a single virtual asset, which is then streamed to the clie nt.</p><p>To group several static resources together in a single stack, you must create a new implementation of the JavaScriptStack interface . This interface has four methods:</p><ul class="alternate"><li><strong>getStylesheets</strong> : This method will return a list of stylesheet files (StylesheetLink-type object) associated to this stack</li></ul><ul class="alternate"><li><strong>getJavaScriptLibraries</strong> : This method will return a list of javascript files (Asset-type object) associated to this stack</li></ul><ul class="alternate"><li><strong>getStacks</strong> : It is also possible to make a stack dependant of other stacks. All the stacks defined in this method will be loaded before the current stack.</li></ul><ul class="alternate"><li><strong>getInitialization</strong> : this method makes it possible to call a JavaScript initialization for the stack. Tapestry will automatically add this initialization to the page that imports the stacks.</li></ul><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>myStack.java</b></div><div class="codeContent panelContent pdl"> +<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"><p> </p></div><p>Tapestry allows you to define groups of related JavaScript libraries and stylesheets as "stacks". The built-in "core" stack is used to define the core JavaScript libraries needed by Tapestry (currently, this includes Prototype and Scriptaculous, as well as Tapestry-specific libraries). Other component libraries may define additional stacks for related sets of resources, for example, to bundle together some portion of the ExtJS or YUI libraries.</p><p>A <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptStack.html">JavaScriptStack</a> can be thought of as a generalization of Tapestry 5.1's ClientInfrastructure, which exists now to define the "core" JavaScript stack.</p><p>JavaScript assets of a stack may (when enabled) be exposed to the client as a single URL (identifying the stack by name). The individual asse ts are combined into a single virtual asset, which is then streamed to the client.</p><p>To group several static resources together in a single stack, you must create a new implementation of the JavaScriptStack interface . This interface has four methods:</p><ul class="alternate"><li><strong>getStylesheets</strong> : This method will return a list of stylesheet files (StylesheetLink-type object) associated to this stack</li></ul><ul class="alternate"><li><strong>getJavaScriptLibraries</strong> : This method will return a list of javascript files (Asset-type object) associated to this stack</li></ul><ul class="alternate"><li><strong>getStacks</strong> : It is also possible to make a stack dependant of other stacks. All the stacks defined in this method will be loaded before the current stack.</li></ul><ul class="alternate"><li><strong>getInitialization</strong> : this method makes it possible to call a JavaScript initialization for the stack. Tapestry will automatically add this init ialization to the page that imports the stacks.</li></ul><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>myStack.java</b></div><div class="codeContent panelContent pdl"> <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class myStack implements JavaScriptStack { private final AssetSource assetSource; Modified: websites/production/tapestry/content/limitations.html ============================================================================== --- websites/production/tapestry/content/limitations.html (original) +++ websites/production/tapestry/content/limitations.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Limitations</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Limitations</h1></div></div> <div class="clearer"></div> </div> Modified: websites/production/tapestry/content/link-components-faq.html ============================================================================== --- websites/production/tapestry/content/link-components-faq.html (original) +++ websites/production/tapestry/content/link-components-faq.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Link Components FAQ</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Link Components FAQ</h1></div></div> <div class="clearer"></div> </div> @@ -96,10 +91,7 @@ <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.3</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> </div></div> -<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"> -<p>You may also bind a link component's <code>parameters</code> parameter; this is a Map of additional query parameters to add to the URL. The Map keys should be strings, and the Map values will be encoded to strings. Tapestry 5.3 also adds a literal map syntax to the <a href="property-expressions.html" title="Property Expressions">property expression language</a>.</p> - -</div><h3 id="LinkComponentsFAQ-HowdoIcreateaLinkbacktothecurrentpagefromacomponent?">How do I create a Link back to the current page from a component?</h3><p>Sometimes it is useful to create a link back to the current page, but you don't always know the name of the page (the link may appear inside a deeply nested subcomponent). Fortunately, this is easy.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"><p>You may also bind a link component's <code>parameters</code> parameter; this is a Map of additional query parameters to add to the URL. The Map keys should be strings, and the Map values will be encoded to strings. Tapestry 5.3 also adds a literal map syntax to the <a href="property-expressions.html" title="Property Expressions">property expression language</a>.</p></div><h3 id="LinkComponentsFAQ-HowdoIcreateaLinkbacktothecurrentpagefromacomponent?">How do I create a Link back to the current page from a component?</h3><p>Sometimes it is useful to create a link back to the current page, but you don't always know the name of the page (the link may appear inside a deeply nested subcomponent). Fortunately, this is easy.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><t:pagelink page="prop:componentResources.pageName">refresh page</t:pagelink> </pre> </div></div><p>Every component has an extra property, componentResources, added to it: it's the instance of <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ComponentResources.html">ComponentResources</a> that represents the link between your code and all of Tapestry's structure around your class. One of the properties of ComponentResources is pageName, the name of the page. By binding the PageLink's page parameter with the "prop:" binding prefix, we ensure that we bind to a computed property; this is necessary because the PageLink.page parameter defaults to the "literal:" binding prefix.</p><p>As an added benefit, if the page class is ever renamed or moved to a different package, the pageName property will automatically adjust to the new name.</p></div> Modified: websites/production/tapestry/content/localization.html ============================================================================== --- websites/production/tapestry/content/localization.html (original) +++ websites/production/tapestry/content/localization.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Localization</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Localization</h1></div></div> <div class="clearer"></div> </div> @@ -69,55 +64,31 @@ </div> <div id="content"> - <div id="ConfluenceContent"><p> </p><p><strong>Localization</strong> (aka L10n) is all about getting the right text to the user, in the right language.</p><div class="aui-label" style="float:right" title="Related Articles"> - - - - - - - - -<h3>Related Articles</h3> - -<ul class="content-by-label"><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="templating-and-markup-faq.html">Templating and Markup FAQ</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="component-classes.html">Component Classes</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="component-parameters.html">Component Parameters</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="localization.html">Localization</a> - - - </div> - </li></ul> -</div><p>Localization support is well integrated into Tapestry. Tapestry allows you to easily separate the text you present to your users from the rest of your application ... pull it out of your Java code and even out of your component templates. You can then translate your messages into other languages and let Tapestry put everything together.</p><h2 id="Localization-ComponentMessageCatalogs">Component Message Catalogs</h2><p>Each component class may have a component message catalog. A component message catalog is a set of files with the extension ".properties". These property files are the same format used by java.util.ResourceBundle, just lines of <code>key=value</code>. These files are stored on the classpath, in the same package folder as the page or component's compiled Java class.</p><p>So for a class named <code>org.example.myapp.pages.MyPage</code>, you would have a main properties file as <code>org/example/myapp/pages/MyPage.properties</code>.</p><p>If you have a translat ions of these values, you provide additional properties file, adding an <a class="external-link" href="http://www.loc.gov/standards/iso639-2/englangn.html" rel="nofollow">ISO language code</a> before the extension. Thus, if you have a French translation, you could create a file <code>MyPage_fr.properties</code>.</p><p>Any values in the more language specific file will <em>override</em> values from the main properties file. If you had an even more specific localization for just French as spoken in France, you could create <code>MyPage_fr_FR.properties</code> (that's a language code plus a country code, and you can even go further and add variants ... but its unlikely that you'll ever need to go beyond just language codes in practice).</p><p>The messages in the catalog are accessed by keys. Tapestry ignores the case of the keys when accessing messages in the catalog.</p><h3 id="Localization-ComponentMessageCatalogInheritance">Component Message Catalog Inheritance</h3><p>If a componen t class is a subclass of another component class, then it inherits that base class' message catalog. Its own message catalog extends and overrides the values inherited from the base class.</p><p>In this way, you could have a base component class that contained common messages, and extend or override those messages in subclasses (just as you would extend or override the methods of the base component class). This, of course, works for as many levels of inheritance as you care to support.</p><h2 id="Localization-Application-wideMessageCatalog">Application-wide Message Catalog</h2><p>If the file <code>WEB-INF/</code><em>AppName</em><code>.properties</code> exists in the context, it will be used as an application-wide message catalog. The <em>AppName</em> is derived from the name of the filter inside the web.xml file; this is most often just "app", thus <code>WEB-INF/app.properties</code>. The search for the file is case sensitive. The properties files may be localized.</p><p>Individual pages and components can override the values defined in the message catalog.</p><div class="navmenu" style="float:right; width:45%; background:white; margin:3px; padding:3px"> + <div id="ConfluenceContent"><p> </p><p><strong>Localization</strong> (aka L10n) is all about getting the right text to the user, in the right language.</p><div class="aui-label" style="float:right" title="Related Articles"><h3>Related Articles</h3><ul class="content-by-label"><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="templating-and-markup-faq.html">Templating and Markup FAQ</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="component-classes.html">Component Classes</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="localization.html">Localization</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="component-parameters.html">Component Parameters</a> + </div> </li></ul></div><p>Localization support is well integrated into Tapestry. Tapestry allows you to easily separate the text you present to your users from the rest of your application ... pull it out of your Java code and even out of your component templates. You can then translate your messages into other languages and let Tapestry put everything together.</p><h2 id="Localization-ComponentMessageCatalogs">Component Message Catalogs</h2><p>Each component class may have a component message catalog. A component message catalog is a set of files with the extension ".properties". These property files are the same format used by java.util.ResourceBundle, just lines of <code>key=value</code>. These files are stored on the classpath, in the same package folder as the page or component's compiled Java class.</p><p>So for a class named <code>org.example.myapp.pages.MyPage</code>, you would have a main properties file as <code>org/example/myapp/pages/MyPage.properties</code>.</p><p>If you have a translations of these values, you provide additional properties file, adding an <a class="external-link" href="http://www.loc.gov/standards/iso639-2/englangn.html" rel="nofollow">ISO language code</a> before the extension. Thus, if you have a French translation, you could create a file <code>MyPage_fr.properties</code>.</p><p>Any values in the more language specific file will <em>override</em> values from the main properties file. If you had an even more specific localization for just French as spoken in France, you could create <code>MyPage_fr_FR.properties</code> (that's a language code plus a country code, and you can even go further and add variants ... but its unlikely that you'll ever need to go beyond just language codes in practice).</p><p>The messages in the catalog are accessed by keys. Tapestry ignores the case of the keys when accessing messages in the catalog.</p><h3 id="Localization-ComponentMessageCatalogInheritance">Component Message Catalog Inheritance</ h3><p>If a component class is a subclass of another component class, then it inherits that base class' message catalog. Its own message catalog extends and overrides the values inherited from the base class.</p><p>In this way, you could have a base component class that contained common messages, and extend or override those messages in subclasses (just as you would extend or override the methods of the base component class). This, of course, works for as many levels of inheritance as you care to support.</p><h2 id="Localization-Application-wideMessageCatalog">Application-wide Message Catalog</h2><p>If the file <code>WEB-INF/</code><em>AppName</em><code>.properties</code> exists in the context, it will be used as an application-wide message catalog. The <em>AppName</em> is derived from the name of the filter inside the web.xml file; this is most often just "app", thus <code>WEB-INF/app.properties</code>. The search for the file is case sensitive. The properties files may be localized .</p><p>Individual pages and components can override the values defined in the message catalog.</p><div class="navmenu" style="float:right; width:45%; background:white; margin:3px; padding:3px"> <div class="confluence-information-macro confluence-information-macro-note"><p class="title">Avoid BOMs</p><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> <p>Make sure that your properties files don't contain <a class="external-link" href="http://en.wikipedia.org/wiki/Byte_order_mark" rel="nofollow">byte order marks (BOM)</a>, because Java – and thus Tapestry – doesn't support BOM in properties files (see <a class="external-link" href="http://bugs.sun.com/view_bug.do?bug_id=4508058" rel="nofollow">http://bugs.sun.com/view_bug.do?bug_id=4508058</a>). Some editors write them out when saving a file in UTF-8, so watch out.</p></div></div></div><h2 id="Localization-PropertiesFileCharset">Properties File Charset</h2><p>Tapestry uses the <code>UTF-8</code> character set (charset) when reading the properties files in a message catalog. This means that you don't have to use the Java <code>native2ascii</code> tool.</p><h2 id="Localization-LocalizedComponentTemplates">Localized Component Templates</h2><p>The same lookup mechanism applies to component templates. Tapestry will search for a localized version of each component template and use the closest match. Thus you could have <code>MyPage_fr.html</code> for French users, and <code>MyPage.html</code> for all other users.</p><h2 id="Localization-AccessingLocalizedMessages">Accessing Localized Messages</h2><p>The above discusses what files to create and where to store them, but doesn't address how to make use of that information.</p><p>Messages can be accessed in one of two ways:</p><ul><li>Using the "message:" <a href="component-parameters.html">binding expression</a> in a component template</li><li>By injecting the component's Messages object<br clear="none"> In the first case, you may use the message: binding prefix with component parameters, or with template expansions:</li></ul><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;"><t:layout title="message:page-title"> Modified: websites/production/tapestry/content/maven-support-faq.html ============================================================================== --- websites/production/tapestry/content/maven-support-faq.html (original) +++ websites/production/tapestry/content/maven-support-faq.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Maven Support FAQ</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Maven Support FAQ</h1></div></div> <div class="clearer"></div> </div> Modified: websites/production/tapestry/content/menuleft.html ============================================================================== --- websites/production/tapestry/content/menuleft.html (original) +++ websites/production/tapestry/content/menuleft.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">menuleft</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">menuleft</h1></div></div> <div class="clearer"></div> </div> Modified: websites/production/tapestry/content/meta-programming-page-content.html ============================================================================== --- websites/production/tapestry/content/meta-programming-page-content.html (original) +++ websites/production/tapestry/content/meta-programming-page-content.html Thu Oct 27 17:20:26 2016 @@ -47,18 +47,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Meta-Programming Page Content</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Meta-Programming Page Content</h1></div></div> <div class="clearer"></div> </div> Modified: websites/production/tapestry/content/page-and-component-classes-faq.html ============================================================================== --- websites/production/tapestry/content/page-and-component-classes-faq.html (original) +++ websites/production/tapestry/content/page-and-component-classes-faq.html Thu Oct 27 17:20:26 2016 @@ -46,18 +46,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Page And Component Classes FAQ</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Page And Component Classes FAQ</h1></div></div> <div class="clearer"></div> </div> @@ -102,13 +97,13 @@ public class DBImage -<span class="gliffy-container" id="gliffy-container-23527573-7643" data-fullwidth="750" data-ceoid="23335008" data-edit="${diagramEditLink.getLinkUrl()}" data-full="${diagramZoomLink.getLinkUrl()}" data-filename="Class Loaders"> +<span class="gliffy-container" id="gliffy-container-23527573-2102" data-fullwidth="750" data-ceoid="23335008" data-edit="${diagramEditLink.getLinkUrl()}" data-full="${diagramZoomLink.getLinkUrl()}" data-filename="Class Loaders"> - <map id="gliffy-map-23527573-3171" name="gliffy-map-23527573-3171"></map> + <map id="gliffy-map-23527573-2647" name="gliffy-map-23527573-2647"></map> - <img class="gliffy-image" id="gliffy-image-23527573-7643" width="750" height="425" data-full-width="750" data-full-height="425" src="https://cwiki.apache.org/confluence/download/attachments/23335008/Class%20Loaders.png?version=4&modificationDate=1283534469000&api=v2" alt="Class Loaders" usemap="#gliffy-map-23527573-3171"> + <img class="gliffy-image" id="gliffy-image-23527573-2102" width="750" height="425" data-full-width="750" data-full-height="425" src="https://cwiki.apache.org/confluence/download/attachments/23335008/Class%20Loaders.png?version=4&modificationDate=1283534469000&api=v2" alt="Class Loaders" usemap="#gliffy-map-23527573-2647"> - <map class="gliffy-dynamic" id="gliffy-dynamic-map-23527573-7643" name="gliffy-dynamic-map-23527573-7643"></map> + <map class="gliffy-dynamic" id="gliffy-dynamic-map-23527573-2102" name="gliffy-dynamic-map-23527573-2102"></map> </span> @@ -119,7 +114,7 @@ public class DBImage . . . } </pre> -</div></div><p>The compiler will catch a misspelling of the constant <code>SUCCESS</code>. Likewise, local constants can be defined for key components, such as "loginForm".</p><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>Ultimately, it's developer choice. HLS prefers the method naming conventions in nearly all cases, especially prototypes and demos, but can see that in some projects and some teams, an annotation-only approach is best.</p></div></div><h3 id="PageAndComponentClassesFAQ-WhydoIhavetoinjectapage?Whycan'tIjustcreateoneusingnew?">Why do I have to inject a page? Why can't I just create one using new?</h3><p>Tapestry tranforms your class at runtime. It tends to build a large constructor for the class instance. Further, an instance of the class is useless by itself, it must be wired together wi th its template and its sub-components.</p><p>On top of that, Tapestry keeps just once instance of each page in memory (since 5.2). It reworks the bytecode of the components so that a single instance can be shared across multiple request handling threads.</p><p>____</p><p> </p><p> </p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p><table class="Footnotes" style="width: 100%; border:none;" cellspacing="0" cellpadding="0" summary="This table contains one or more notes for references made elsewhere on the page."><caption class="accessibility">Footnotes</caption><thead class="accessibility"><tr class="accessibility"><th colspan="1" rowspan="1" class="accessibility" id="footnote-th1">Reference</th><th colspan="1" rowspan="1" class="accessibility" id="footnote-th2">Notes</th></tr></thead><tbody></tbody></table></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p> </p><p> </p></div> +</div></div><p>The compiler will catch a misspelling of the constant <code>SUCCESS</code>. Likewise, local constants can be defined for key components, such as "loginForm".</p><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>Ultimately, it's developer choice. HLS prefers the method naming conventions in nearly all cases, especially prototypes and demos, but can see that in some projects and some teams, an annotation-only approach is best.</p></div></div><h3 id="PageAndComponentClassesFAQ-WhydoIhavetoinjectapage?Whycan'tIjustcreateoneusingnew?">Why do I have to inject a page? Why can't I just create one using new?</h3><p>Tapestry tranforms your class at runtime. It tends to build a large constructor for the class instance. Further, an instance of the class is useless by itself, it must be wired together wi th its template and its sub-components.</p><p>On top of that, Tapestry keeps just once instance of each page in memory (since 5.2). It reworks the bytecode of the components so that a single instance can be shared across multiple request handling threads.</p><p>____</p><p> </p><p> </p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p><table class="Footnotes" style="width: 100%; border:none;" cellspacing="0" cellpadding="0" summary="This table contains one or more notes for references made elsewhere on the page."><caption class="accessibility">Footnotes</caption><thead class="accessibility"><tr class="accessibility"><th colspan="1" rowspan="1" class="accessibility" id="footnote-th1">Reference</th><th colspan="1" rowspan="1" class="accessibility" id="footnote-th2">Notes</th></tr></thead><tbody></tbody></table></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p> </p><p> </p></div> </div> <div class="clearer"></div>
