Author: buildbot Date: Mon Mar 10 18:18:17 2025 New Revision: 1089296 Log: Production update by buildbot for tapestry
Modified: websites/production/tapestry/content/2011/03/30/tapestry-kudos.html websites/production/tapestry/content/ajax-components-faq.html websites/production/tapestry/content/application-module-class-cheat-sheet.html websites/production/tapestry/content/beaneditform-faq.html websites/production/tapestry/content/class-reloading.html websites/production/tapestry/content/community.html websites/production/tapestry/content/component-events-faq.html websites/production/tapestry/content/component-parameters.html websites/production/tapestry/content/component-reference.html websites/production/tapestry/content/configuration.html websites/production/tapestry/content/developer-bible.html websites/production/tapestry/content/exploring-the-project.html websites/production/tapestry/content/forms-and-form-components-faq.html websites/production/tapestry/content/forms-and-validation.html websites/production/tapestry/content/general-questions.html websites/production/tapestry/content/hibernate-support-faq.html websites/production/tapestry/content/injection-faq.html websites/production/tapestry/content/integrating-with-jpa.html websites/production/tapestry/content/integrating-with-spring-framework.html websites/production/tapestry/content/integration-with-existing-applications.html websites/production/tapestry/content/javascript-faq.html websites/production/tapestry/content/javascript-rewrite-in-54.html websites/production/tapestry/content/limitations.html websites/production/tapestry/content/link-components-faq.html websites/production/tapestry/content/maven-support-faq.html websites/production/tapestry/content/page-and-component-classes-faq.html websites/production/tapestry/content/page-navigation.html websites/production/tapestry/content/release-notes-50.html websites/production/tapestry/content/release-notes-51.html websites/production/tapestry/content/release-notes-52.html websites/production/tapestry/content/release-notes-53.html websites/production/tapestry/content/release-notes-545.html websites/production/tapestry/content/release-notes-550.html websites/production/tapestry/content/release-notes-560.html websites/production/tapestry/content/release-notes-561.html websites/production/tapestry/content/release-notes-562.html websites/production/tapestry/content/release-notes-563.html websites/production/tapestry/content/release-notes-564.html websites/production/tapestry/content/release-notes-570.html websites/production/tapestry/content/release-notes-571.html websites/production/tapestry/content/release-notes-572.html websites/production/tapestry/content/release-notes-573.html websites/production/tapestry/content/release-notes-580.html websites/production/tapestry/content/release-notes-581.html websites/production/tapestry/content/release-notes-582.html websites/production/tapestry/content/release-notes-583.html websites/production/tapestry/content/release-notes-584.html websites/production/tapestry/content/release-notes-585.html websites/production/tapestry/content/release-notes-586.html websites/production/tapestry/content/release-notes-587.html websites/production/tapestry/content/release-notes-590.html websites/production/tapestry/content/release-upgrade-faq.html websites/production/tapestry/content/request-processing-faq.html websites/production/tapestry/content/rest-support-580.html websites/production/tapestry/content/runtime-exceptions.html websites/production/tapestry/content/security-faq.html websites/production/tapestry/content/session-storage.html websites/production/tapestry/content/specific-errors-faq.html websites/production/tapestry/content/tapestry-inversion-of-control-faq.html websites/production/tapestry/content/templating-and-markup-faq.html Modified: websites/production/tapestry/content/2011/03/30/tapestry-kudos.html ============================================================================== --- websites/production/tapestry/content/2011/03/30/tapestry-kudos.html (original) +++ websites/production/tapestry/content/2011/03/30/tapestry-kudos.html Mon Mar 10 18:18:17 2025 @@ -160,12 +160,12 @@ <p>From my daily work with T5 over past few months I can say with confidence it is a love-hate relationship. I get frustrated trying to get over the learning curve when things don't work. I don't enjoy stepping into the framework's guts unless I absolutely have to... But then... when I finally get things to work, it's like EVERY TIME the code is so elegant and gorgeous, it just makes me love Tapestry that much more. It's an amazing feeling, one I haven't had in many years as a Java developer.</p> -<p>And we love our new Spring-less world of Tapestry! We love that Tapesty IoC allows us to painlessly inject remote EJB proxies <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/alfxyv/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)"> LOVE IT !!! Our app layer is as light as it can be. We literally run only on:</p> +<p>And we love our new Spring-less world of Tapestry! We love that Tapesty IoC allows us to painlessly inject remote EJB proxies <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/-e27bm1/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)"> LOVE IT !!! Our app layer is as light as it can be. We literally run only on:</p> <ul><li>Tapestry</li><li>Apache commons-lang</li><li>And, of course, our EJB client libraries</li></ul> -<p>In practice, we are able to concurrently run two completely different teams: Tapestry Devs and EJB/Hibernate devs. Both are experts within their own domain, no stepping on each other's toes <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/alfxyv/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)"> Sure, this could be done with any framework, it's just that Tapestry makes it so darn easy and most importantly F-U-N <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/alfxyv/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)"></p> +<p>In practice, we are able to concurrently run two completely different teams: Tapestry Devs and EJB/Hibernate devs. Both are experts within their own domain, no stepping on each other's toes <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/-e27bm1/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)"> Sure, this could be done with any framework, it's just that Tapestry makes it so darn easy and most importantly F-U-N <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/-e27bm1/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)"></p> <p>Thank you for this great framework!</p> Modified: websites/production/tapestry/content/ajax-components-faq.html ============================================================================== --- websites/production/tapestry/content/ajax-components-faq.html (original) +++ websites/production/tapestry/content/ajax-components-faq.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><h1 id="AjaxComponentsFAQ-AjaxComponents">Ajax Components</h1><p>Main article: <a href="ajax-and-zones.html">Ajax and Zones</a></p><h2 id="AjaxComponentsFAQ-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544265456 {padding: 0px;} -div.rbtoc1741544265456 ul {margin-left: 0px;} -div.rbtoc1741544265456 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630670498 {padding: 0px;} +div.rbtoc1741630670498 ul {margin-left: 0px;} +div.rbtoc1741630670498 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544265456"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630670498"> <ul class="toc-indentation"><li><a href="#AjaxComponentsFAQ-DoIhavetospecifybothidandt:idforZonecomponents?">Do I have to specify both id and t:id for Zone components?</a></li><li><a href="#AjaxComponentsFAQ-HowdoIupdatethecontentofaZonefromaneventhandlermethod?">How do I update the content of a Zone from an event handler method?</a></li><li><a href="#AjaxComponentsFAQ-HowtoIupdatemultiplezonesinasingleeventhandler?">How to I update multiple zones in a single event handler?</a></li><li><a href="#AjaxComponentsFAQ-What'sthatweirdnumberinthemiddleoftheclientidsafteraZoneisupdated?">What's that weird number in the middle of the client ids after a Zone is updated?</a></li><li><a href="#AjaxComponentsFAQ-WhydoIsometimesgettheexception"Therenderedcontentdidnotincludeanyelementsthatallowforthepositioningofthehiddenformfield'selement."whenrenderinganemptyZone?">Why do I sometimes get the exception "The rendered content did not include any elements that allow for the positioning of the hidden form field's element." when rendering an empty Zone?</a></li></ul> </div><h2 id="AjaxComponentsFAQ-DoIhavetospecifybothidandt:idforZonecomponents?">Do I have to specify both <code>id</code> and <code>t:id</code> for Zone components?</h2><p>The examples for the Zone component (in the Component Reference) consistently specify both <code>id</code> and <code>t:id</code> and this is probably a good idea.</p><p>Generally speaking, if you don't specify the client-side id (the <code>id</code> attribute), it will be the same as the Tapestry component id (<code>t:id</code>).</p><p>However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique client side id). The Zone may be rendering as part of a partial page render, in which case, a random unique id is inserted into the id. There are other examples where Tapestry component ids in nested components may also clash.</p><p>The point is, to be sure, specify the exact client id. This will be the value for the <code>zone</code> p arameter of the triggering component (such as a Form, PageLink, ActionLink, etc.).</p><h2 id="AjaxComponentsFAQ-HowdoIupdatethecontentofaZonefromaneventhandlermethod?">How do I update the content of a Zone from an event handler method?</h2><p>When a client-side link or form triggers an update, the return value from the event handler method is used to construct a partial page response; this partial page response includes markup content that is used to update the Zone's client-side <code><div></code> element.</p><p>Where does that content come from? You inject it into your page.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre><code class="language-xml"><t:zone id="search" t:id="searchZone"> Modified: websites/production/tapestry/content/application-module-class-cheat-sheet.html ============================================================================== --- websites/production/tapestry/content/application-module-class-cheat-sheet.html (original) +++ websites/production/tapestry/content/application-module-class-cheat-sheet.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><p>The <strong>Application Module</strong> class is a simple Java class used to configure Tapestry. A system of annotations and naming conventions allows Tapestry to determine what services are provided by the module to your application. This is the place where you bind your custom implementation of services, contribute to, decorate and override existing services.</p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544067459 {padding: 0px;} -div.rbtoc1741544067459 ul {margin-left: 0px;} -div.rbtoc1741544067459 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630470279 {padding: 0px;} +div.rbtoc1741630470279 ul {margin-left: 0px;} +div.rbtoc1741630470279 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544067459"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630470279"> <ul class="toc-indentation"><li>Related Articles</li></ul> <ul><li><a href="#ApplicationModuleClassCheatSheet-Namingconventions">Naming conventions</a> <ul class="toc-indentation"><li><a href="#ApplicationModuleClassCheatSheet-Thebindmethod">The bind method</a></li><li><a href="#ApplicationModuleClassCheatSheet-Servicebuildermethods">Service builder methods</a></li><li><a href="#ApplicationModuleClassCheatSheet-Contributemethods">Contribute methods</a> Modified: websites/production/tapestry/content/beaneditform-faq.html ============================================================================== --- websites/production/tapestry/content/beaneditform-faq.html (original) +++ websites/production/tapestry/content/beaneditform-faq.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><h1 id="BeanEditFormFAQ-BeanEditForm">BeanEditForm</h1><p>Main Article: <a href="beaneditform-guide.html">BeanEditForm Guide</a></p><h2 id="BeanEditFormFAQ-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544076329 {padding: 0px;} -div.rbtoc1741544076329 ul {margin-left: 0px;} -div.rbtoc1741544076329 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630479341 {padding: 0px;} +div.rbtoc1741630479341 ul {margin-left: 0px;} +div.rbtoc1741630479341 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544076329"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630479341"> <ul class="toc-indentation"><li><a href="#BeanEditFormFAQ-WhydoIgetexceptionsaboutinstantiatingabeanwhenusingBeanEditForm?">Why do I get exceptions about instantiating a bean when using BeanEditForm?</a></li><li><a href="#BeanEditFormFAQ-What'sthedifferencebetweenBeanEditorandBeanEditForm?">What's the difference between BeanEditor and BeanEditForm?</a></li><li><a href="#BeanEditFormFAQ-HowdoIcustomizethelayoutoftheBeanEditForm?">How do I customize the layout of the BeanEditForm?</a></li></ul> </div><h2 id="BeanEditFormFAQ-WhydoIgetexceptionsaboutinstantiatingabeanwhenusingBeanEditForm?">Why do I get exceptions about instantiating a bean when using BeanEditForm?</h2><p>When you render a BeanEditForm, or when the rendered form is submitted, Tapestry must instantiate an instance of the object to be edited. This occurs when the BeanEditForm's <code>object</code> parameter is bound to null: Tapestry instantiates an instance of the property type so that the BeanEditForm has an object to read default values from, or to push submitted values into.</p><p>By default, this uses the standard <a href="injection-in-detail.html">injection mechanism</a>, which means that Tapestry will identify the public constructor with the most parameters, and attempt to find objects and other objects for each constructor parameter.</p><p>There's two ways to fine tune this so you don't get errors:</p><ul><li>Place an @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache /tapestry5/ioc/annotations/Inject.html">Inject</a> annotation on the correct constructor to use (often, the constructor with no parameters).</li></ul><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre><code class="language-java">public class MyBean { Modified: websites/production/tapestry/content/class-reloading.html ============================================================================== --- websites/production/tapestry/content/class-reloading.html (original) +++ websites/production/tapestry/content/class-reloading.html Mon Mar 10 18:18:17 2025 @@ -190,11 +190,11 @@ <p>One of the best features of Tapestry is automatic reloading of changed classes and templates. <em>Page and component</em> classes will automatically reload when changed. Likewise, changes to component templates and other related resources will also be picked up immediately. In addition, starting in version 5.2, your service classes will also be reloaded automatically after changes (if you're using <a href="ioc.html">Tapestry IoC</a>). Starting in version 5.8.3, you enable multiple classloader mode, which allows smarter page class invalidation.</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title conf-macro-render">Not necessarily throwing away all cached page instances</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Since Tapestry 5.8.3, Tapestry can be run in multiple classloaders mode. When it's on, only the affected cached page instances are discarded and rebuilt instead of all of them. </p></div></div><h2 id="ClassReloading-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544084605 {padding: 0px;} -div.rbtoc1741544084605 ul {margin-left: 0px;} -div.rbtoc1741544084605 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630487841 {padding: 0px;} +div.rbtoc1741630487841 ul {margin-left: 0px;} +div.rbtoc1741630487841 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544084605"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630487841"> <ul class="toc-indentation"><li><a href="#ClassReloading-TemplateReloading">Template Reloading</a></li><li><a href="#ClassReloading-ClassReloading">Class Reloading</a></li><li><a href="#ClassReloading-PackagesScanned">Packages Scanned</a></li><li><a href="#ClassReloading-FileSystemOnly">File System Only</a></li><li><a href="#ClassReloading-ClassLoaderIssues">Class Loader Issues</a></li><li><a href="#ClassReloading-ClassCastExceptions">ClassCastExceptions</a></li><li><a href="#ClassReloading-HandlingReloadsinyourCode">Handling Reloads in your Code</a></li><li><a href="#ClassReloading-CheckingForUpdates">Checking For Updates</a></li><li><a href="#ClassReloading-TroubleshootingLiveClassReloading">Troubleshooting Live Class Reloading</a> <ul class="toc-indentation"><li><a href="#ClassReloading-QuickChecklist">Quick Checklist</a></li><li><a href="#ClassReloading-IfLiveClassReloadingdoesn'twork">If Live Class Reloading doesn't work</a> <ul class="toc-indentation"><li><a href="#ClassReloading-ProductionMode">Production Mode</a></li><li><a href="#ClassReloading-BuildPathIssues">Build Path Issues</a></li><li><a href="#ClassReloading-BuildingAutomatically">Building Automatically</a></li><li><a href="#ClassReloading-TurnoffJVMhotcodeswapping&automaticrestarts">Turn off JVM hot code swapping & automatic restarts</a></li></ul> Modified: websites/production/tapestry/content/community.html ============================================================================== --- websites/production/tapestry/content/community.html (original) +++ websites/production/tapestry/content/community.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><p>Tapestry has an active community of users and developers. This is an overview of how to participate, along with a list of some of the great contributions of the community members.</p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544110377 {padding: 0px;} -div.rbtoc1741544110377 ul {margin-left: 0px;} -div.rbtoc1741544110377 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630513556 {padding: 0px;} +div.rbtoc1741630513556 ul {margin-left: 0px;} +div.rbtoc1741630513556 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544110377"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630513556"> <ul class="toc-indentation"><li><a href="#Community-GettingInvolved">Getting Involved</a> <ul class="toc-indentation"><li><a href="#Community-ReportingProblems/GettingSupport">Reporting Problems / Getting Support</a></li><li><a href="#Community-ContributingtranslationsforTapestrybuilt-inmessages">Contributing translations for Tapestry built-in messages</a></li><li><a href="#Community-SourceCodeAccess">Source Code Access</a></li><li><a href="#Community-BecomingaContributor">Becoming a Contributor</a></li><li><a href="#Community-BecomingaCommitter">Becoming a Committer</a></li></ul> </li><li><a href="#Community-CommunityContributions">Community Contributions</a> Modified: websites/production/tapestry/content/component-events-faq.html ============================================================================== --- websites/production/tapestry/content/component-events-faq.html (original) +++ websites/production/tapestry/content/component-events-faq.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><h1 id="ComponentEventsFAQ-ComponentEvents">Component Events</h1><p>Main Article: <a href="component-events.html">Component Events</a></p><h2 id="ComponentEventsFAQ-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544209216 {padding: 0px;} -div.rbtoc1741544209216 ul {margin-left: 0px;} -div.rbtoc1741544209216 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630613622 {padding: 0px;} +div.rbtoc1741630613622 ul {margin-left: 0px;} +div.rbtoc1741630613622 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544209216"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630613622"> <ul class="toc-indentation"><li><a href="#ComponentEventsFAQ-WhydoesTapestrysendaredirectafteraformissubmitted?">Why does Tapestry send a redirect after a form is submitted?</a></li><li><a href="#ComponentEventsFAQ-IspecifiedazoneinmyActionLink/EventLink,sowhydoesn'tmyeventfireviaajax(request.isXHR()isfalse)?">I specified a zone in my ActionLink/EventLink, so why doesn't my event fire via ajax (request.isXHR() is false)?</a></li></ul> </div><h2 id="ComponentEventsFAQ-WhydoesTapestrysendaredirectafteraformissubmitted?">Why does Tapestry send a redirect after a form is submitted?</h2><p>This is an extension of the <a class="external-link" href="http://en.wikipedia.org/wiki/Post/Redirect/Get" rel="nofollow">Post/Redirect/Get</a> approach. It ensures that after an operation that updates server-side state, such as a form submission, if the user resubmits the resulting page, the operation is <strong>not</strong> performed a second time; instead just the results of the operation, reflecting the changed server-side state, is re-rendered.</p><p>This has the unwanted requirement that any data needed to render the response must persist between the event request (the form submission) and the render request; this often means that fields must be annotated with @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html">Persist</a>. Modified: websites/production/tapestry/content/component-parameters.html ============================================================================== --- websites/production/tapestry/content/component-parameters.html (original) +++ websites/production/tapestry/content/component-parameters.html Mon Mar 10 18:18:17 2025 @@ -259,11 +259,11 @@ </div></div><p>A component may have any number of parameters. Each parameter has a specific name, a specific Java type (which may be a primitive value), and may be <em>optional</em> or <em>required</em>.</p><p>Within a component class, parameters are declared by using the @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Parameter.html">Parameter</a> annotation on a private field, as we'll see below.</p><p><span class="confluence-anchor-link" id="ComponentParameters-bindingparameters"></span></p><h1 id="ComponentParameters-ParameterBindings">Parameter Bindings</h1><p>In Tapestry, a parameter is not a slot into which data is pushed: it is a <em>connection</em> between a field of the component (marked with the @Parameter annotation) and a property or resource of the component's container. (Components can be nested, so the container can be either the page or another component.)</p><div class="navmenu" style="float:right; backgro und:white; margin:3px; padding:3px"> <div class="panel" style="border-width: 1px;"><div class="panelHeader" style="border-bottom-width: 1px;"><b>Contents</b></div><div class="panelContent"> <style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544037777 {padding: 0px;} -div.rbtoc1741544037777 ul {margin-left: 0px;} -div.rbtoc1741544037777 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630439969 {padding: 0px;} +div.rbtoc1741630439969 ul {margin-left: 0px;} +div.rbtoc1741630439969 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style><div class="toc-macro rbtoc1741544037777"> +/*]]>*/</style><div class="toc-macro rbtoc1741630439969"> <ul class="toc-indentation"><li><a href="#ComponentParameters-ParameterBindings">Parameter Bindings</a></li><li><a href="#ComponentParameters-BindingExpressions">Binding Expressions</a></li><li><a href="#ComponentParameters-@Parameterannotation">@Parameter annotation</a></li><li><a href="#ComponentParameters-Don'tusethe${...}syntax!">Don't use the ${...} syntax!</a></li><li><a href="#ComponentParameters-InformalParameters">Informal Parameters</a></li><li><a href="#ComponentParameters-ParametersAreBi-Directional">Parameters Are Bi-Directional</a></li><li><a href="#ComponentParameters-InheritedParameterBindings">Inherited Parameter Bindings</a></li><li><a href="#ComponentParameters-ComputedParameterBindingDefaults">Computed Parameter Binding Defaults</a></li><li><a href="#ComponentParameters-UnboundParameters">Unbound Parameters</a></li><li><a href="#ComponentParameters-ParameterTypeCoercion">Parameter Type Coercion</a></li><li><a href="#ComponentParameters-ParameterNames">Parameter N ames</a></li><li><a href="#ComponentParameters-DeterminingifBound">Determining if Bound</a></li><li><a href="#ComponentParameters-PublishingParameters">Publishing Parameters</a></li></ul> </div> </div></div></div> <p>The connection between a component and a property (or resource) of its container is called a <em>binding</em>. The binding is two-way: the component can read the bound property by reading its parameter field. Likewise, a component that updates its parameter field will update the bound property.</p><p>This is important in a lot of cases; for example a TextField component can read <em>and update</em> the property bound to its value parameter. It reads the value when rendering, but updates the value when the form is submitted.</p><p>The component listed below is a looping component; it renders its body a number of times, defined by its <code>start</code> and <code>end</code> parameters (which set the boundaries of the loop). The component can update a <code>result</code> parameter bound to a property of its container; it will automatically count up or down depending on whether <code>start</code> or <code>end</code> is larger.</p><div class="code panel pdl" st yle="border-width: 1px;"><div class="codeContent panelContent pdl"> Modified: websites/production/tapestry/content/component-reference.html ============================================================================== --- websites/production/tapestry/content/component-reference.html (original) +++ websites/production/tapestry/content/component-reference.html Mon Mar 10 18:18:17 2025 @@ -199,11 +199,11 @@ <p></p><p><strong>Contents</strong></p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544086533 {padding: 0px;} -div.rbtoc1741544086533 ul {margin-left: 0px;} -div.rbtoc1741544086533 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630489789 {padding: 0px;} +div.rbtoc1741630489789 ul {margin-left: 0px;} +div.rbtoc1741630489789 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544086533"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630489789"> <ul class="toc-indentation"><li><a href="#ComponentReference-Tapestry-providedComponents">Tapestry-provided Components</a> <ul class="toc-indentation"><li><a href="#ComponentReference-AJAX-specificComponents">AJAX-specific Components</a></li><li><a href="#ComponentReference-BeanDisplaying&Editing">Bean Displaying & Editing</a></li><li><a href="#ComponentReference-ConditionalandLoopingComponents">Conditional and Looping Components</a></li><li><a href="#ComponentReference-FormComponents">Form Components</a></li><li><a href="#ComponentReference-Grids,TablesandTrees">Grids, Tables and Trees</a></li><li><a href="#ComponentReference-LinksandButtons">Links and Buttons</a></li><li><a href="#ComponentReference-OutputandMessages">Output and Messages</a></li><li><a href="#ComponentReference-Miscellaneous">Miscellaneous</a></li></ul> </li><li><a href="#ComponentReference-TapestryMixins">Tapestry Mixins</a></li><li><a href="#ComponentReference-TapestryPages">Tapestry Pages</a></li><li><a href="#ComponentReference-BaseComponents">Base Components</a></li><li><a href="#ComponentReference-OtherComponentLibraries">Other Component Libraries</a></li></ul> Modified: websites/production/tapestry/content/configuration.html ============================================================================== --- websites/production/tapestry/content/configuration.html (original) +++ websites/production/tapestry/content/configuration.html Mon Mar 10 18:18:17 2025 @@ -226,11 +226,11 @@ <h1 id="Configuration-ConfiguringTapestry">Configuring Tapestry</h1><p>This page discusses all the ways in which Tapestry can be configured. Tapestry applications are configured almost entirely using Java, with very little XML at all.</p><p><strong>Contents</strong></p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544000810 {padding: 0px;} -div.rbtoc1741544000810 ul {margin-left: 0px;} -div.rbtoc1741544000810 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630402436 {padding: 0px;} +div.rbtoc1741630402436 ul {margin-left: 0px;} +div.rbtoc1741630402436 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544000810"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630402436"> <ul class="toc-indentation"><li><a href="#Configuration-XMLconfiguration(web.xml)">XML configuration (web.xml)</a></li><li><a href="#Configuration-YourApplication'sModuleClass">Your Application's Module Class</a></li><li><a href="#Configuration-ConfigurationSymbolNames">Configuration Symbol Names</a></li><li><a href="#Configuration-SettingComponentParameterDefaults">Setting Component Parameter Defaults</a></li><li><a href="#Configuration-ConfiguringIgnoredPaths">Configuring Ignored Paths</a></li><li><a href="#Configuration-ConfiguringContentTypeMapping">Configuring Content Type Mapping</a></li><li><a href="#Configuration-SettingExecutionModes">Setting Execution Modes</a></li><li><a href="#Configuration-SegregatingApplicationsIntoFolders">Segregating Applications Into Folders</a></li></ul> </div><h2 id="Configuration-XMLconfiguration(web.xml)">XML configuration (web.xml)</h2><p>Tapestry runs on top of the standard Java Servlet API. To the servlet container, such as Tomcat, Tapestry appears as a <em>servlet filter</em>. This gives Tapestry great flexibility in matching URLs without requiring lots of XML configuration.</p><p>Although most configuration is done with Java, a small but necessary amount of configuration occurs inside the servlet deployment descriptor, WEB-INF/web.xml. Most of the configuration is boilerplate, nearly the same for all applications.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>web.xml (partial)</b></div><div class="codeContent panelContent pdl"> <pre><code class="language-xml"><!DOCTYPE web-app Modified: websites/production/tapestry/content/developer-bible.html ============================================================================== --- websites/production/tapestry/content/developer-bible.html (original) +++ websites/production/tapestry/content/developer-bible.html Mon Mar 10 18:18:17 2025 @@ -225,7 +225,7 @@ </div> -<h2 id="DeveloperBible-IDEChoices">IDE Choices</h2><h3 id="DeveloperBible-IntelliJ">IntelliJ</h3><p>It's a free license for all committers and it's just better. Yes, the first few days can be an unpleasant fumble because everything is almost, but not quite, familiar. Pretty soon you'll love IDEA and recognize that Eclipse has been bending you over and doing unspeakable things.</p><p>There are shared code formatting settings in the <a class="external-link" href="https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=tree;f=support">support directory</a> (idea-settings.jar). This will prevent unexpected conflicts due to formatting.</p><h3 id="DeveloperBible-Eclipse">Eclipse</h3><p>Howard uses this ... because he can't manage to switch IDEs constantly (he uses Eclipse for training). Lately its gotten better.</p><p>As with IntelliJ, there are shared code formatting settings for Eclipse in the <a class="external-link" href="https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=t ree;f=support">support directory</a> (tapestry-indent-eclipse.xml).</p><h2 id="DeveloperBible-Copyrights">Copyrights</h2><p>All source files should have the ASF copyright comment on top, except where such a comment would interfere with its behavior. For example, component template files omit the comment.</p><p>As you make changes to files, update the copyright to add the current year to the list. The goal is that the copyright notice includes the year in which files change. When creating a new file, don't back date the copyright year ... start with the current year. Try not to change the copyright year on files that haven't actually changed.</p><p>IntelliJ has a great comparison view: Cmd-9 to see the local changes, the Cmd-D to see the differences. You can whip through the changes (using Cmd-forward arrow) and make sure copyrights are up to date as you review the changes prior to a commit.</p><h2 id="DeveloperBible-CommitMessages">Commit Messages</h2><p>Always provide a commit mess age. Howard generally tries to work off the JIRA, so his commit message is often:</p><blockquote><p>TAP5-1234: Make the Foo Widget more Ajax-tastic!</p></blockquote><p>It is <em>very important</em> to include the JIRA issue id in the commit. This is used in many places: JIRA links issues to the Git commits for that issue (very handy for seeing what changed as part of a bug fix). The Hudson CI server does as well, and will actually link Git commits to issues after succesfully building.</p><h2 id="DeveloperBible-JIRAProcedures">JIRA Procedures</h2><p>All Tapestry committers should be registerred with JIRA and part of the tapestry-developers JIRA group.</p><p>Every committer is invited to look at the list of <a class="external-link" href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=12317068">'Review for closing'</a> issues and review them as it contains probably outdated or no more valid issues.</p><p>There's also a list of all <a class=" external-link" href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=12316792">Open</a> issue about the project.</p><p>Ideally, we would always work top priortity to low priority. Howard sometimes jump out of order, if there's something cool to work on that fits in an available time slot. Alternately, you are always allowed to change the priority of a bug before or as you work it.</p><p>As a general rule issues which are "<em>Invalid</em>" or "<em>Won't</em> <em>Fix</em>" shouldn't have a "<em>Fix</em> <em>version</em>".</p><h3 id="DeveloperBible-Startingwork">Starting work</h3><p>When you start to work on an issue, make sure it is <em>assigned to you</em> and use the <em>start progress</em> option.</p><p>Add comments about the state of the fix, or the challenges in creating a fix. This often spurs the Issue's adder to provide more details.</p><p>Update the issue description to make it more legible and more precise if needed, i.e., "NPE in CheckUpda tes" might become "NullPointerException when checking for updates to files that have been deleted". Verbose is good.</p><h3 id="DeveloperBible-Closingbugs">Closing bugs</h3><p>Is it a bug fix without tests? <strong>No.</strong> A good plan is to write a test that fails then work the code until the test passes. Often code works in a unit test but fails unexpectedly in an integration test. As the G-Man says <em>"Expect unforeseen consequences"</em>.</p><p>When you check in a fix, you should <strong>close</strong> the issue and make sure the <strong>fix release</strong> is correct.</p><p>We're playing fast and loose – a better procedure would be to mark the bug resolved and verify the fix before closing it. That's ok, we have a community to double check our work <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/alfxyv/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)">.</p><p>For anything non-trivial, wait for the Hudson CI server to build. It catches a lot of things ... such as files that were not added to Git. And even IntelliJ has a bit of trouble with wildly refactored code. Hudson will catch all that.</p><h3 id="DeveloperBible-Invalidissuesandduplicates">Invalid issues and duplicates</h3><p>Always provide comments about why_ an issue is invalid (<em>"A Ruby implementation of Tapestry is out of scope for the project."</em>), or at least, a link to the duplicate issues.</p><p>Consider writing new tests to prove that an issue is not valid and then leave the tests in place – then close the bug as invalid.</p><p>Close the issue but <em>make sure the fix release is blank</em>. Otherwise, the issue <em>will be listed in the release notes</em>, which we don't want.</p><h2 id="DeveloperBible-Publicvs.Private/Internal">Public vs. Private/Internal</h2><p>This is a real big deal. As long as code is in the internal package, we have a high degree of carte-blanche to change it. As soon as code i s public, we become handcuffed to backwards compatibility.</p><p><em>Interfaces are public, implementations are private</em>. You can see this is the bulk of the code, where org.apache.tapestry5.services is almost all interfaces and the implementations are in org.apache.tapestry5.internal.services.</p><p>Many more services have both the interface and the implementation in org.apache.tapestry5.internal.services.</p><p>We absolutely <em>do not</em> want to make Page or ComponentPageElement public. You will often see public service facades that take a page name as a method parameter, and convert it to a page instance before invoking methods on internal services.</p><h2 id="DeveloperBible-EvolvingComponents">Evolving Components</h2><p>We do not have a specific plan for this yet. Future Tapestry 5 will add features to allow clean renames of parameters, and a way to deprecated and eventually remove components.</p><h2 id="DeveloperBible-EvolvingInterfaces">Evolving Interfaces</h2><p>Tapest ry uses interfaces quite extensively.</p><p>Interfaces fall into two categories: service interfaces called by user code, and interfaces implemented by user code.</p><p>Internal interfaces may be changed at any time. That's why so much is kept internal.</p><h3 id="DeveloperBible-ServiceInterfaces">Service Interfaces</h3><p>New methods may be added if absolutely necessary, but this should be avoided if at all possible. Don't forget the <code>@since</code> Javadoc annotation.</p><p>Consider having a stable public facade service whose implementation calls into one or more internal service.</p><h3 id="DeveloperBible-UserInterfaces">User Interfaces</h3><p>These should be frozen, no changes once released. Failure to do so causes <em>non-backwards compatible upgrade problems</em>; that is, classes that implement the (old) interface are suddenly invalid, missing methods from the (new) interface.</p><p>Consider introducing a new interface that extends the old one and adds new methods. Make su re you support both.</p><p>You can see this with ServiceDef and ServiceDef2 (which extends ServiceDef). Yes this can be a bit ugly.</p><p>Howard uses utility methods that convert from ServiceDef to ServiceDef2, adding a wrapper implementation around a ServiceDef instance if necessary:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<h2 id="DeveloperBible-IDEChoices">IDE Choices</h2><h3 id="DeveloperBible-IntelliJ">IntelliJ</h3><p>It's a free license for all committers and it's just better. Yes, the first few days can be an unpleasant fumble because everything is almost, but not quite, familiar. Pretty soon you'll love IDEA and recognize that Eclipse has been bending you over and doing unspeakable things.</p><p>There are shared code formatting settings in the <a class="external-link" href="https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=tree;f=support">support directory</a> (idea-settings.jar). This will prevent unexpected conflicts due to formatting.</p><h3 id="DeveloperBible-Eclipse">Eclipse</h3><p>Howard uses this ... because he can't manage to switch IDEs constantly (he uses Eclipse for training). Lately its gotten better.</p><p>As with IntelliJ, there are shared code formatting settings for Eclipse in the <a class="external-link" href="https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=t ree;f=support">support directory</a> (tapestry-indent-eclipse.xml).</p><h2 id="DeveloperBible-Copyrights">Copyrights</h2><p>All source files should have the ASF copyright comment on top, except where such a comment would interfere with its behavior. For example, component template files omit the comment.</p><p>As you make changes to files, update the copyright to add the current year to the list. The goal is that the copyright notice includes the year in which files change. When creating a new file, don't back date the copyright year ... start with the current year. Try not to change the copyright year on files that haven't actually changed.</p><p>IntelliJ has a great comparison view: Cmd-9 to see the local changes, the Cmd-D to see the differences. You can whip through the changes (using Cmd-forward arrow) and make sure copyrights are up to date as you review the changes prior to a commit.</p><h2 id="DeveloperBible-CommitMessages">Commit Messages</h2><p>Always provide a commit mess age. Howard generally tries to work off the JIRA, so his commit message is often:</p><blockquote><p>TAP5-1234: Make the Foo Widget more Ajax-tastic!</p></blockquote><p>It is <em>very important</em> to include the JIRA issue id in the commit. This is used in many places: JIRA links issues to the Git commits for that issue (very handy for seeing what changed as part of a bug fix). The Hudson CI server does as well, and will actually link Git commits to issues after succesfully building.</p><h2 id="DeveloperBible-JIRAProcedures">JIRA Procedures</h2><p>All Tapestry committers should be registerred with JIRA and part of the tapestry-developers JIRA group.</p><p>Every committer is invited to look at the list of <a class="external-link" href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=12317068">'Review for closing'</a> issues and review them as it contains probably outdated or no more valid issues.</p><p>There's also a list of all <a class=" external-link" href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=12316792">Open</a> issue about the project.</p><p>Ideally, we would always work top priortity to low priority. Howard sometimes jump out of order, if there's something cool to work on that fits in an available time slot. Alternately, you are always allowed to change the priority of a bug before or as you work it.</p><p>As a general rule issues which are "<em>Invalid</em>" or "<em>Won't</em> <em>Fix</em>" shouldn't have a "<em>Fix</em> <em>version</em>".</p><h3 id="DeveloperBible-Startingwork">Starting work</h3><p>When you start to work on an issue, make sure it is <em>assigned to you</em> and use the <em>start progress</em> option.</p><p>Add comments about the state of the fix, or the challenges in creating a fix. This often spurs the Issue's adder to provide more details.</p><p>Update the issue description to make it more legible and more precise if needed, i.e., "NPE in CheckUpda tes" might become "NullPointerException when checking for updates to files that have been deleted". Verbose is good.</p><h3 id="DeveloperBible-Closingbugs">Closing bugs</h3><p>Is it a bug fix without tests? <strong>No.</strong> A good plan is to write a test that fails then work the code until the test passes. Often code works in a unit test but fails unexpectedly in an integration test. As the G-Man says <em>"Expect unforeseen consequences"</em>.</p><p>When you check in a fix, you should <strong>close</strong> the issue and make sure the <strong>fix release</strong> is correct.</p><p>We're playing fast and loose – a better procedure would be to mark the bug resolved and verify the fix before closing it. That's ok, we have a community to double check our work <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/-e27bm1/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)">.</p><p>For anything non-trivial, wait for th e Hudson CI server to build. It catches a lot of things ... such as files that were not added to Git. And even IntelliJ has a bit of trouble with wildly refactored code. Hudson will catch all that.</p><h3 id="DeveloperBible-Invalidissuesandduplicates">Invalid issues and duplicates</h3><p>Always provide comments about why_ an issue is invalid (<em>"A Ruby implementation of Tapestry is out of scope for the project."</em>), or at least, a link to the duplicate issues.</p><p>Consider writing new tests to prove that an issue is not valid and then leave the tests in place – then close the bug as invalid.</p><p>Close the issue but <em>make sure the fix release is blank</em>. Otherwise, the issue <em>will be listed in the release notes</em>, which we don't want.</p><h2 id="DeveloperBible-Publicvs.Private/Internal">Public vs. Private/Internal</h2><p>This is a real big deal. As long as code is in the internal package, we have a high degree of carte-blanche to change it. As soon as code is public, we become handcuffed to backwards compatibility.</p><p><em>Interfaces are public, implementations are private</em>. You can see this is the bulk of the code, where org.apache.tapestry5.services is almost all interfaces and the implementations are in org.apache.tapestry5.internal.services.</p><p>Many more services have both the interface and the implementation in org.apache.tapestry5.internal.services.</p><p>We absolutely <em>do not</em> want to make Page or ComponentPageElement public. You will often see public service facades that take a page name as a method parameter, and convert it to a page instance before invoking methods on internal services.</p><h2 id="DeveloperBible-EvolvingComponents">Evolving Components</h2><p>We do not have a specific plan for this yet. Future Tapestry 5 will add features to allow clean renames of parameters, and a way to deprecated and eventually remove components.</p><h2 id="DeveloperBible-EvolvingInterfaces">Evolving Interfaces</h2><p>Tapes try uses interfaces quite extensively.</p><p>Interfaces fall into two categories: service interfaces called by user code, and interfaces implemented by user code.</p><p>Internal interfaces may be changed at any time. That's why so much is kept internal.</p><h3 id="DeveloperBible-ServiceInterfaces">Service Interfaces</h3><p>New methods may be added if absolutely necessary, but this should be avoided if at all possible. Don't forget the <code>@since</code> Javadoc annotation.</p><p>Consider having a stable public facade service whose implementation calls into one or more internal service.</p><h3 id="DeveloperBible-UserInterfaces">User Interfaces</h3><p>These should be frozen, no changes once released. Failure to do so causes <em>non-backwards compatible upgrade problems</em>; that is, classes that implement the (old) interface are suddenly invalid, missing methods from the (new) interface.</p><p>Consider introducing a new interface that extends the old one and adds new methods. Make s ure you support both.</p><p>You can see this with ServiceDef and ServiceDef2 (which extends ServiceDef). Yes this can be a bit ugly.</p><p>Howard uses utility methods that convert from ServiceDef to ServiceDef2, adding a wrapper implementation around a ServiceDef instance if necessary:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre><code class="language-java"> public static ServiceDef2 toServiceDef2(final ServiceDef sd) { if (sd instanceof ServiceDef2) @@ -247,7 +247,7 @@ }; } </code></pre> -</div></div><h2 id="DeveloperBible-Useof@since">Use of @since</h2><p>When adding new classes or interface, or adding new methods to existing types, add an @since Javadoc comment.</p><p>Use the complete version number of the release in which the type or method was added: i.e., <em>@since 5.1.0.3</em>.</p><h2 id="DeveloperBible-CodeStyle&Formatting">Code Style & Formatting</h2><p>Yes, at one time Howard used leading underscores for field names. He has since changed my mind, but this unfortunately infected other people; please try to make your code blend in when modifying existing source.</p><p>Long ago, Tapestry (3) code used the regrettable "leading-I-on-interfaces" style. Don't do that. Instead, name the implementation class with an "Impl" at the end.</p><p>Howard prefers braces on a new line (and thus, open braces lined up with close braces), so that's what the default code formatting is set up for. It's okay to omit braces for trivial one-liner if statements, such as <code >if (!test) return;</code>.</p><p>Indent with 4 spaces instead of >tabs.</p><p>Use a lot of vertical whitespace to break methods into logical >sections.</p><p>We're coding Java, not Pascal; it's better to have a few >checks early on with quick returns or exceptions than have ten-levels deep >block nesting just so a method can have a single return statement. In other >words, <em>else considered harmful</em>. Low code complexity is better, more >readable, more maintainable code.</p><p>Don't bother alphabetizing things, >because the IDE lets you jump around easily.</p><p><em>Final is the new >private.</em> Final fields are great for multi-threaded code. Especially when >creating service implementations with dependencies, store those dependencies >into final fields. Once we're all running on 100 core workstations, you'll >thank me. Seriously, Java's memory model is seriously twisted stuff, and >assigning to a non-final field from a constructor opens up a tiny window of >non-thread safety.</p><h2 id= "DeveloperBible-Comments">Comments</h2><p>Comments are overwhelmingly important. Try to capture the <em>why</em> of a class or method. Add lots of links, to code that will be invoked by the method, to related methods or classes, and so forth. For instance, you may often have an annotation, a worker class for the annotation, and a related service all cross-linked.</p><p>Comment the <em>interfaces</em> and don't get worked up on the <em>implementations</em>. Javadoc does a perfectly good job of copying interface comments to implementations, so this falls under the <em>Don't Repeat Yourself</em> guideline.</p><p>Be very careful about documenting what methods can accept null, and what methods may return null. Generally speaking, people will assume that null is not allowed for parameters, and method will never return null, unless it is explicitly documented that null is allowed (or potentially returned).</p><h2 id="DeveloperBible-Documentation">Documentation</h2><p>Try and keep the docum entation up-to date as you make changes; it is <em>much</em> harder to do so later. This is now much easier using the Confluence wiki (you're reading the result <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/alfxyv/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)">).</p><p>Documentation was at one point the <em>#1 criticism</em> of Tapestry!</p><h2 id="DeveloperBible-ClassandMethodNamingConventions">Class and Method Naming Conventions</h2><p>Naming things is hard. Names that make sense to one person won't to another.</p><p>That being said, Howard has tried to be somewhat consistent with naming. Not perfectly.</p><h3 id="DeveloperBible-Factory,Creator">Factory, Creator</h3><p>A factory class creates new objects. Methods will often be prefixed with "create" or "new". Don't expect a Factory to cache anything, it just creates new things.</p><h3 id="DeveloperBible-Source">Source</h3><p>A source is a level up from a Fa ctory. It <em>may</em> combine multiple factories together. It <em>usually</em> will cache the result. Method are often prefixed with "get".</p><h3 id="DeveloperBible-Findvs.Get">Find vs. Get</h3><p>For methods: A "find" prefix indicates that a non-match is valid and null may be returned. A "get" prefix indicates that a non-match is invalid and an exception will be thrown in that case (and null will never be returned).</p><h3 id="DeveloperBible-Contribution">Contribution</h3><p>A data object usually associated with a Tapestry IoC service's configuration.</p><h3 id="DeveloperBible-Filter">Filter</h3><p>Part of a pipeline, where there's an associated main interface, and the Filter wraps around that main interface. Each main interface method is duplicated in the Filter, with an extra parameter used to chain the interface.</p><h3 id="DeveloperBible-Manager">Manager</h3><p>Often a wrapper around a service configuration, it provides access to the contributed values (possibly after some tr ansformation).</p><h3 id="DeveloperBible-To">To</h3><p>A method prefix that indicates a conversion or coersion from one type to another. I.e., <code>toUserPresentable()</code>.</p><h3 id="DeveloperBible-Worker">Worker</h3><p>An object that peforms a specific job. Workers will be stateless, but will be passed a stateful object to perform some operation upon.</p><h3 id="DeveloperBible-Builder">Builder</h3><p>An object whose job is to create other objects, typically in the context of creating a core service implementation for a Tapestry IoC service (such as PipelineBuilder or ChainBuilder).</p><h3 id="DeveloperBible-Support">Support</h3><p>An object that provides supporting operations to other objects; this is a kind of "loose aggregation".</p><h3 id="DeveloperBible-Parameters">Parameters</h3><p>A data object that holds a number of related values that would otherwise be separate parameter values to a method. This tends to streamline code (especially when using a Filter interface) and a llows the parameters to be evolved without changing the method signature.</p><h3 id="DeveloperBible-Strategy">Strategy</h3><p>An object that "plugs into" some other code, allowing certain decisions to be deferred to the Strategy. Often a Strategy is selected based on the type of some object being operated upon.</p><h3 id="DeveloperBible-Context">Context</h3><p>Captures some stateful information that may be passed around between stateless services.</p><h3 id="DeveloperBible-Constants">Constants</h3><p>A non-instantiable class that contains public static fields that are referenced in multiple places.</p><h3 id="DeveloperBible-Hub">Hub</h3><p>An object that allows listeners to be registered. Often includes a method prefixed with "trigger" that will send notifications to listeners.</p><h2 id="DeveloperBible-ImplementtoString()">Implement <code>toString()</code></h2><p>Objects that are exposed to user code should generally implement a meaningful toString() method. And that method should be tested.</p><h2 id="DeveloperBible-Subclassing">Subclassing</h2><p>You'll notice there isn't a lot of inheritance in Tapestry. Given the function of the IoC container, it is much more common to use some variation of <em>aggregation</em> rather than <em>inheritance</em>.</p><p>Where subclassing exists, the guideline for constructor parameters is: the subclass should include all the constructor parameters of the superclass, in the same positions. Thus subclass constructor parameters are appended to the list of super-class constructor parameters.</p></div> +</div></div><h2 id="DeveloperBible-Useof@since">Use of @since</h2><p>When adding new classes or interface, or adding new methods to existing types, add an @since Javadoc comment.</p><p>Use the complete version number of the release in which the type or method was added: i.e., <em>@since 5.1.0.3</em>.</p><h2 id="DeveloperBible-CodeStyle&Formatting">Code Style & Formatting</h2><p>Yes, at one time Howard used leading underscores for field names. He has since changed my mind, but this unfortunately infected other people; please try to make your code blend in when modifying existing source.</p><p>Long ago, Tapestry (3) code used the regrettable "leading-I-on-interfaces" style. Don't do that. Instead, name the implementation class with an "Impl" at the end.</p><p>Howard prefers braces on a new line (and thus, open braces lined up with close braces), so that's what the default code formatting is set up for. It's okay to omit braces for trivial one-liner if statements, such as <code >if (!test) return;</code>.</p><p>Indent with 4 spaces instead of >tabs.</p><p>Use a lot of vertical whitespace to break methods into logical >sections.</p><p>We're coding Java, not Pascal; it's better to have a few >checks early on with quick returns or exceptions than have ten-levels deep >block nesting just so a method can have a single return statement. In other >words, <em>else considered harmful</em>. Low code complexity is better, more >readable, more maintainable code.</p><p>Don't bother alphabetizing things, >because the IDE lets you jump around easily.</p><p><em>Final is the new >private.</em> Final fields are great for multi-threaded code. Especially when >creating service implementations with dependencies, store those dependencies >into final fields. Once we're all running on 100 core workstations, you'll >thank me. Seriously, Java's memory model is seriously twisted stuff, and >assigning to a non-final field from a constructor opens up a tiny window of >non-thread safety.</p><h2 id= "DeveloperBible-Comments">Comments</h2><p>Comments are overwhelmingly important. Try to capture the <em>why</em> of a class or method. Add lots of links, to code that will be invoked by the method, to related methods or classes, and so forth. For instance, you may often have an annotation, a worker class for the annotation, and a related service all cross-linked.</p><p>Comment the <em>interfaces</em> and don't get worked up on the <em>implementations</em>. Javadoc does a perfectly good job of copying interface comments to implementations, so this falls under the <em>Don't Repeat Yourself</em> guideline.</p><p>Be very careful about documenting what methods can accept null, and what methods may return null. Generally speaking, people will assume that null is not allowed for parameters, and method will never return null, unless it is explicitly documented that null is allowed (or potentially returned).</p><h2 id="DeveloperBible-Documentation">Documentation</h2><p>Try and keep the docum entation up-to date as you make changes; it is <em>much</em> harder to do so later. This is now much easier using the Confluence wiki (you're reading the result <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/-e27bm1/8804/z1btw/_/images/icons/emoticons/smile.svg" data-emoticon-name="smile" alt="(smile)">).</p><p>Documentation was at one point the <em>#1 criticism</em> of Tapestry!</p><h2 id="DeveloperBible-ClassandMethodNamingConventions">Class and Method Naming Conventions</h2><p>Naming things is hard. Names that make sense to one person won't to another.</p><p>That being said, Howard has tried to be somewhat consistent with naming. Not perfectly.</p><h3 id="DeveloperBible-Factory,Creator">Factory, Creator</h3><p>A factory class creates new objects. Methods will often be prefixed with "create" or "new". Don't expect a Factory to cache anything, it just creates new things.</p><h3 id="DeveloperBible-Source">Source</h3><p>A source is a level up from a F actory. It <em>may</em> combine multiple factories together. It <em>usually</em> will cache the result. Method are often prefixed with "get".</p><h3 id="DeveloperBible-Findvs.Get">Find vs. Get</h3><p>For methods: A "find" prefix indicates that a non-match is valid and null may be returned. A "get" prefix indicates that a non-match is invalid and an exception will be thrown in that case (and null will never be returned).</p><h3 id="DeveloperBible-Contribution">Contribution</h3><p>A data object usually associated with a Tapestry IoC service's configuration.</p><h3 id="DeveloperBible-Filter">Filter</h3><p>Part of a pipeline, where there's an associated main interface, and the Filter wraps around that main interface. Each main interface method is duplicated in the Filter, with an extra parameter used to chain the interface.</p><h3 id="DeveloperBible-Manager">Manager</h3><p>Often a wrapper around a service configuration, it provides access to the contributed values (possibly after some t ransformation).</p><h3 id="DeveloperBible-To">To</h3><p>A method prefix that indicates a conversion or coersion from one type to another. I.e., <code>toUserPresentable()</code>.</p><h3 id="DeveloperBible-Worker">Worker</h3><p>An object that peforms a specific job. Workers will be stateless, but will be passed a stateful object to perform some operation upon.</p><h3 id="DeveloperBible-Builder">Builder</h3><p>An object whose job is to create other objects, typically in the context of creating a core service implementation for a Tapestry IoC service (such as PipelineBuilder or ChainBuilder).</p><h3 id="DeveloperBible-Support">Support</h3><p>An object that provides supporting operations to other objects; this is a kind of "loose aggregation".</p><h3 id="DeveloperBible-Parameters">Parameters</h3><p>A data object that holds a number of related values that would otherwise be separate parameter values to a method. This tends to streamline code (especially when using a Filter interface) and allows the parameters to be evolved without changing the method signature.</p><h3 id="DeveloperBible-Strategy">Strategy</h3><p>An object that "plugs into" some other code, allowing certain decisions to be deferred to the Strategy. Often a Strategy is selected based on the type of some object being operated upon.</p><h3 id="DeveloperBible-Context">Context</h3><p>Captures some stateful information that may be passed around between stateless services.</p><h3 id="DeveloperBible-Constants">Constants</h3><p>A non-instantiable class that contains public static fields that are referenced in multiple places.</p><h3 id="DeveloperBible-Hub">Hub</h3><p>An object that allows listeners to be registered. Often includes a method prefixed with "trigger" that will send notifications to listeners.</p><h2 id="DeveloperBible-ImplementtoString()">Implement <code>toString()</code></h2><p>Objects that are exposed to user code should generally implement a meaningful toString() method. And that method should be tested.</p><h2 id="DeveloperBible-Subclassing">Subclassing</h2><p>You'll notice there isn't a lot of inheritance in Tapestry. Given the function of the IoC container, it is much more common to use some variation of <em>aggregation</em> rather than <em>inheritance</em>.</p><p>Where subclassing exists, the guideline for constructor parameters is: the subclass should include all the constructor parameters of the superclass, in the same positions. Thus subclass constructor parameters are appended to the list of super-class constructor parameters.</p></div> </div> <!-- /// Content End --> </div> Modified: websites/production/tapestry/content/exploring-the-project.html ============================================================================== --- websites/production/tapestry/content/exploring-the-project.html (original) +++ websites/production/tapestry/content/exploring-the-project.html Mon Mar 10 18:18:17 2025 @@ -334,12 +334,21 @@ public class Index <pre><code class="language-xml"><html t:type="layout" title="tutorial1 Index" p:sidebarTitle="Framework Version" ... </code></pre> -</div></div><p>This binds two parameters, <code>title</code> and <code>sidebarTitle</code>, of the Layout component to the literal strings "tutorial1 Index" and "Framework Version", respectively.</p><p>The Layout component will actually provide the bulk of the HTML ultimately sent to the browser; we'll look at its template in a later chapter. The point is, the page's template is integrated into the Layout component's template. The following diagram shows how parameters passed to the Layout component end up rendered in the final page:</p><div class="aui-message error shadowed"> - <p class="title"><span class="gliffy-aui-icon"></span>Gliffy Macro Error</p> - <p>An error occurred while rendering this diagram. Please contact your administrator.</p> - <ul><li><strong>Name:</strong> Templates and Parameters</li></ul> -</div> -<p>The interesting point here (and this is an advanced concept in Tapestry, one we'll return to later) is that we can pass a chunk of the Index.tml template to the Layout component as the <code>sidebar</code> parameter. That's what the tapestry:parameter namespace (the "p:" prefix) is for; the element name is matched against a parameter of the component and the entire block of the template is passed into the Layout component ... which decides where, inside <em>its</em> template, that block gets rendered.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p>This binds two parameters, <code>title</code> and <code>sidebarTitle</code>, of the Layout component to the literal strings "tutorial1 Index" and "Framework Version", respectively.</p><p>The Layout component will actually provide the bulk of the HTML ultimately sent to the browser; we'll look at its template in a later chapter. The point is, the page's template is integrated into the Layout component's template. The following diagram shows how parameters passed to the Layout component end up rendered in the final page:</p><p> + + + + +<span class="gliffy-container" id="gliffy-container-24346949-3763" data-fullwidth="913" data-size="S" data-ceoid="24188263" data-edit="${diagramEditLink.getLinkUrl()}" data-full="${diagramZoomLink.getLinkUrl()}" data-filename="Templates and Parameters"> + + <map id="gliffy-map-24346949-9086" name="gliffy-map-24346949-9086"></map> + + <img class="gliffy-image gliffy-image-border" id="gliffy-image-24346949-3763" width="304" height="300" data-full-width="913" data-full-height="901" src="https://cwiki.apache.org/confluence/download/attachments/24188263/Templates%20and%20Parameters.png?version=2&modificationDate=1371888025000&api=v2" alt="Templates and Parameters" usemap="#gliffy-map-24346949-9086"> + + <map class="gliffy-dynamic" id="gliffy-dynamic-map-24346949-3763" name="gliffy-dynamic-map-24346949-3763"></map> +</span> + +</p><p>The interesting point here (and this is an advanced concept in Tapestry, one we'll return to later) is that we can pass a chunk of the Index.tml template to the Layout component as the <code>sidebar</code> parameter. That's what the tapestry:parameter namespace (the "p:" prefix) is for; the element name is matched against a parameter of the component and the entire block of the template is passed into the Layout component ... which decides where, inside <em>its</em> template, that block gets rendered.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre><code class="language-xml"><t:eventlink event="complete" class="btn btn-default">Complete&raquo;</t:eventlink> </code></pre> </div></div><p>This time, it's the <code>page</code> parameter of the PageLink component that is bound, to the literal value "Index" (which is the name of this page). This gets rendered as a URL that re-renders the page, which is how the current time gets updated. You can also create links to other pages in the application and, as we'll see in later chapters, attach additional information to the URL beyond just the page name.</p><h1 id="ExploringtheProject-AMagicTrick">A Magic Trick</h1><p>Now it's time for a magic trick. Edit Index.java and change the <code>getCurrentTime()</code> method to:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Index.java (partial)</b></div><div class="codeContent panelContent pdl"> Modified: websites/production/tapestry/content/forms-and-form-components-faq.html ============================================================================== --- websites/production/tapestry/content/forms-and-form-components-faq.html (original) +++ websites/production/tapestry/content/forms-and-form-components-faq.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><h1 id="FormsandFormComponentsFAQ-FormsandFormComponents">Forms and Form Components</h1><p>Main article: <a href="forms-and-validation.html">Forms and Validation</a></p><h2 id="FormsandFormComponentsFAQ-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544225417 {padding: 0px;} -div.rbtoc1741544225417 ul {margin-left: 0px;} -div.rbtoc1741544225417 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630630048 {padding: 0px;} +div.rbtoc1741630630048 ul {margin-left: 0px;} +div.rbtoc1741630630048 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544225417"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630630048"> <ul class="toc-indentation"><li><a href="#FormsandFormComponentsFAQ-Whatisthet:formdatahiddenfieldfor?">What is the t:formdata hidden field for?</a></li><li><a href="#FormsandFormComponentsFAQ-HowdoIchangethelabelforafieldonthefly?">How do I change the label for a field on the fly?</a></li><li><a href="#FormsandFormComponentsFAQ-Tapestryfocusesonthewrongfieldinmyform,howdoIfixthat?">Tapestry focuses on the wrong field in my form, how do I fix that?</a></li></ul> </div><h2 id="FormsandFormComponentsFAQ-Whatisthet:formdatahiddenfieldfor?">What is the <code>t:formdata</code> hidden field for?</h2><p>In Tapestry, rendering a form can be a complicated process; inside the body of the Form component are many of field components: TextField, Select, TextArea, and so forth. Each of these must pull data out of your data model and convert it to the string form used inside the client web browser. In addition, JavaScript to support client-side validation must be generated. This can be further complicated by the use of Loop and If components, or made really complicated by the use of Block (to render portions of other pages: this is what the BeanEditForm component does).</p><p>Along the way, the Form is generating unique form control names for each field component, as it renders.</p><p>When the client-side Form is submitted, an event is triggered on the server-side Form component. It now needs to locate each component, in turn, inform the component of its control name, and allow the component to read the corresponding query parameter. The component then converts the client-side string back into a server-side value and performs validations before updating the data model.</p><p>That's where <code>t:formdata</code> comes in. While components are rendering, they are using the FormSupport environmental object to record callbacks:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>FormSupport.java (partial)</b></div><div class="codeContent panelContent pdl"> <pre><code class="language-java">public interface FormSupport extends ClientElement Modified: websites/production/tapestry/content/forms-and-validation.html ============================================================================== --- websites/production/tapestry/content/forms-and-validation.html (original) +++ websites/production/tapestry/content/forms-and-validation.html Mon Mar 10 18:18:17 2025 @@ -199,11 +199,11 @@ <p></p><p>Tapestry provides support for creating and rendering forms, populating their fields, and validating user input. For simple cases, input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (optionally) on the client as well. In addition, you can provide event handler methods in your page or component classes to handle more complex validation scenarios.</p><p>Finally, Tapestry not only makes it easy to present errors messages to the user, but it can also automatically highlight form fields when validation fails.</p><p><strong>Contents</strong></p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544268878 {padding: 0px;} -div.rbtoc1741544268878 ul {margin-left: 0px;} -div.rbtoc1741544268878 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630673989 {padding: 0px;} +div.rbtoc1741630673989 ul {margin-left: 0px;} +div.rbtoc1741630673989 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544268878"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630673989"> <ul class="toc-indentation"><li>Related Articles</li></ul> <ul><li><a href="#FormsandValidation-TheFormComponent">The Form Component</a> <ul class="toc-indentation"><li><a href="#FormsandValidation-FormEvents">Form Events</a></li><li><a href="#FormsandValidation-HandlingEvents">Handling Events</a></li><li><a href="#FormsandValidation-TrackingValidationErrors">Tracking Validation Errors</a></li><li><a href="#FormsandValidation-StoringDataBetweenRequests">Storing Data Between Requests</a></li><li><a href="#FormsandValidation-ConfiguringFieldsandLabels">Configuring Fields and Labels</a></li></ul> Modified: websites/production/tapestry/content/general-questions.html ============================================================================== --- websites/production/tapestry/content/general-questions.html (original) +++ websites/production/tapestry/content/general-questions.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><h1 id="GeneralQuestions-GeneralQuestions">General Questions</h1><h2 id="GeneralQuestions-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544065576 {padding: 0px;} -div.rbtoc1741544065576 ul {margin-left: 0px;} -div.rbtoc1741544065576 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630468360 {padding: 0px;} +div.rbtoc1741630468360 ul {margin-left: 0px;} +div.rbtoc1741630468360 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544065576"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630468360"> <ul class="toc-indentation"><li><a href="#GeneralQuestions-HowdoIgetstartedwithTapestry?">How do I get started with Tapestry?</a></li><li><a href="#GeneralQuestions-WhydoesTapestryusePrototype(inversionsbefore5.4)?WhynotinsertfavoriteJavaScriptlibraryhere?">Why does Tapestry use Prototype (in versions before 5.4)? Why not insert favorite JavaScript library here?</a></li><li><a href="#GeneralQuestions-WhydoesTapestryhaveitsownInversionofControlContainer?WhynotSpringorGuice?">Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice?</a></li><li><a href="#GeneralQuestions-HowdoIupgradefromTapestry4toTapestry5?">How do I upgrade from Tapestry 4 to Tapestry 5?</a></li><li><a href="#GeneralQuestions-HowdoIupgradefromoneversionofTapestry5toanother?">How do I upgrade from one version of Tapestry 5 to another?</a></li><li><a href="#GeneralQuestions-WhyaretherebothRequestandHttpServletRequest?">Why are there both Request and HttpServletRequest?</a></li></ul> </div><h2 id="GeneralQuestions-HowdoIgetstartedwithTapestry?">How do I get started with Tapestry?</h2><p class="confluence-link">The easiest way to get started is to use <a class="external-link" href="http://maven.apache.org">Apache Maven</a> to create your initial project; Maven can use an <em>archetype</em> (a kind of project template) to create a bare-bones Tapestry application for you. See the <a href="getting-started.html">Getting Started</a> page for more details.</p><p>Even without Maven, Tapestry is quite easy to set up. You just need to <a href="general-questions.html">download</a> the binaries and setup your build to place them inside your WAR's WEB-INF/lib folder. The rest is just some one-time <a href="configuration.html">configuration of the web.xml deployment descriptor</a>.</p><h2 id="GeneralQuestions-WhydoesTapestryusePrototype(inversionsbefore5.4)?WhynotinsertfavoriteJavaScriptlibraryhere?">Why does Tapestry use Prototype (in versions before 5.4)? Why not <em>i nsert favorite JavaScript library here</em>?</h2><p>An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known JavaScript library as part of Tapestry.</p><p>At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, whereas jQuery was just getting started.</p><p>The intent has always been to make this aspect of Tapestry pluggable. Tapestry 5.4 includes the option of either Prototype or jQuery, and future versions of Tapestry will likely remove Prototype as an option..</p><h2 id="GeneralQuestions-WhydoesTapestryhaveitsownInversionofControlContainer?WhynotSpringorGuice?">Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice?</h2><p>An Inversion of Control Container is <em>the</em> key piece of Tape stry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry.</p><p>Tapestry IoC includes a number of features that distinguish itself from other containers:</p><ul><li>Configured in code, not XML</li><li>Built-in extension mechanism for services: configurations and contributions</li><li>Built-in aspect oriented programming model (service decorations and advice)</li><li>Easy modularization</li><li>Best-of-breed exception reporting</li></ul><p>Because Tapestry is implemented on top of its IoC container, and because the container makes it easy to extend or replace any service inside the container, it is possible to make the small changes to Tapestry needed to customize it to any project's needs.</p><p>In addition – and this is critical – Tapestry allows 3rd party libraries to be built that fully participate in the configurability of Tapestry itself. This means that such libraries can be configured the same way T apestry itself is configured, and such libraries can also configure Tapestry itself. This <em>distributed configuration</em> requires an IOC container that fully supports such configurability.</p><h2 id="GeneralQuestions-HowdoIupgradefromTapestry4toTapestry5?">How do I upgrade from Tapestry 4 to Tapestry 5?</h2><p>There is no existing tool that supports upgrading from Tapestry 4 to Tapestry 5; Tapestry 5 is a complete rewrite.</p><p>Many of the basic concepts in Tapestry 4 are still present in Tapestry 5, but refactored, improved, streamlined, and simplified. The basic concept of pages, templates and components are largely the same. Other aspects, such as server-side event handling, is markedly different.</p><p>Tapestry 5 is designed so that it can live side-by-side in the same servlet as a Tapestry 4 app, without package namespace conflicts, sharing session data and common resources such as images and CSS. This means that you can gradually migrate a Tapestry 4 app to Tapestry 5 one page (or one portion of the app) at a time.</p><h2 id="GeneralQuestions-HowdoIupgradefromoneversionofTapestry5toanother?">How do I upgrade from one version of Tapestry 5 to another?</h2><p>Main Article: <a href="how-to-upgrade.html">How to Upgrade</a>.</p><p>A lot of effort goes into making an upgrade from one Tapestry 5 release to another go smoothly. In the general case, it is just a matter of updating the version number in your Maven <code>build.xml</code> or Gradle <code>build.gradle</code> file and executing the appropriate commands (e.g., <code>gradle idea</code> or <code>mvn eclipse:eclipse</code>) to bring your local workspace up to date with the latest binaries.</p><p>After changing dependencies, you should always perform a clean recompile of your application.</p><p>We make every effort to ensure backwards-compatibility. Tapestry is mostly coded in terms of interfaces; those interfaces are stable to a point: interfaces your code is expected to implement are usually complet ely frozen; interfaces your code is expected to invoke, such as the interfaces to IoC services, are stable, but may have new methods added in a release; existing methods are not changed.</p><p>In <em>rare</em> cases a choice is necessary between fixing bugs (or adding essential functionality) and maintaining complete backwards compatibility; in those cases, an incompatible change may be introduced. These are always discussed in detail in the <a href="release-notes.html">Release Notes</a> for the specific release. You should always read the release notes before attempting an upgrade, and always (really, <em>always</em>) be prepared to retest your application afterwards.</p><p>Note that you should be careful any time you make use of <strong>internal</strong> APIs (you can tell an API is internal by the package name, <code>org.apache.tapestry5.internal). </code>Internal APIs may change <em>at any time</em>; there's no guarantee of backwards compatibility. Please always check on th e documentation, or consult the user mailing list, to see if there's a stable, public alternative. If you do make use of internal APIs, be sure to get a discussion going so that your needs can be met in the future by a stable, public API.</p><h2 id="GeneralQuestions-WhyaretherebothRequestandHttpServletRequest?"><span style="color: rgb(83,145,38);">Why are there both Request and HttpServletRequest?</span></h2><p>Tapestry's Request interface is <em>very</em> close to the standard HttpServletRequest interface. It differs in a few ways, omitting some unneeded methods, and adding a couple of new methods (such as <code>isXHR()</code>), as well as changing how some existing methods operate. For example, <code>getParameterNames()</code> returns a sorted List of Strings; HttpServletRequest returns an Enumeration, which is a very dated approach.</p><p>However, the stronger reason for Request (and the related interfaces Response and Session) is to enable the support for Portlets at some point in the future. By writing code in terms of Tapestry's Request, and not HttpServletRequest, you can be assured that the same code will operate in both Servlet Tapestry and Portlet Tapestry.</p></div> </div> Modified: websites/production/tapestry/content/hibernate-support-faq.html ============================================================================== --- websites/production/tapestry/content/hibernate-support-faq.html (original) +++ websites/production/tapestry/content/hibernate-support-faq.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><h1 id="HibernateSupportFAQ-HibernateSupport">Hibernate Support</h1><p>Main article: <a href="hibernate.html">Hibernate</a></p><h2 id="HibernateSupportFAQ-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544180249 {padding: 0px;} -div.rbtoc1741544180249 ul {margin-left: 0px;} -div.rbtoc1741544180249 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630584891 {padding: 0px;} +div.rbtoc1741630584891 ul {margin-left: 0px;} +div.rbtoc1741630584891 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544180249"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630584891"> <ul class="toc-indentation"><li><a href="#HibernateSupportFAQ-HowdoIgetHibernatetostartupupwhentheapplicationstartsup,ratherthanlazilywiththefirstrequestfortheapplication?">How do I get Hibernate to startup up when the application starts up, rather than lazily with the first request for the application?</a></li></ul> </div><h2 id="HibernateSupportFAQ-HowdoIgetHibernatetostartupupwhentheapplicationstartsup,ratherthanlazilywiththefirstrequestfortheapplication?">How do I get Hibernate to startup up when the application starts up, rather than lazily with the first request for the application?</h2><p>This was a minor problem in 5.0; by 5.1 it is just a matter of overriding the configuration system <code>tapestry.hibernate-early-startup</code> to "true".</p></div> </div> Modified: websites/production/tapestry/content/injection-faq.html ============================================================================== --- websites/production/tapestry/content/injection-faq.html (original) +++ websites/production/tapestry/content/injection-faq.html Mon Mar 10 18:18:17 2025 @@ -155,11 +155,11 @@ <!-- /// Content Start --> <div id="content"> <div id="ConfluenceContent"><h1 id="InjectionFAQ-Injection">Injection</h1><p>Main article:  <a href="injection.html">Injection</a></p><h2 id="InjectionFAQ-Contents">Contents</h2><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1741544106328 {padding: 0px;} -div.rbtoc1741544106328 ul {margin-left: 0px;} -div.rbtoc1741544106328 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1741630509856 {padding: 0px;} +div.rbtoc1741630509856 ul {margin-left: 0px;} +div.rbtoc1741630509856 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1741544106328"> +/*]]>*/</style></p><div class="toc-macro rbtoc1741630509856"> <ul class="toc-indentation"><li><a href="#InjectionFAQ-What'sthedifferencebetweenthe@Componentand@InjectComponentannotations?">What's the difference between the @Component and @InjectComponent annotations?</a></li><li><a href="#InjectionFAQ-What'sthedifferencebetweenthe@InjectPageand@InjectContainerannotations?">What's the difference between the @InjectPage and @InjectContainer annotations?</a></li><li><a href="#InjectionFAQ-IgetanexceptionbecauseIhavetwoserviceswiththesameinterface,howdoIhandlethis?">I get an exception because I have two services with the same interface, how do I handle this?</a></li><li><a href="#InjectionFAQ-What'sthedifferencebetween@Injectand@Environmental?">What's the difference between @Inject and @Environmental?</a></li><li><a href="#InjectionFAQ-Butwait...IseeIusedthe@Injectannotationanditstillworked.Whatgives?">But wait ... I see I used the @Inject annotation and it still worked. What gives?</a></li><li><a href="#InjectionFAQ-Ok,butRequestisasingletonservi ce,notanenvironmental,andIcaninjectthat.IsTapestryreallythreadsafe?">Ok, but Request is a singleton service, not an environmental, and I can inject that. Is Tapestry really thread safe?</a></li><li><a href="#InjectionFAQ-Iuse@Injectonafieldtoinjectaservice,butthefieldisstillnull,whathappened?">I use @Inject on a field to inject a service, but the field is still null, what happened?</a></li></ul> </div><h2 id="InjectionFAQ-What'sthedifferencebetweenthe@Componentand@InjectComponentannotations?">What's the difference between the <code>@Component</code> and <code>@InjectComponent</code> annotations?</h2><p>The <code>@Component</code> annotation is used to define the <em>type</em> of component, and its parameter bindings. When using <code>@Component</code>, the template must not define the type, and any parameter bindings are merged in:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre><code class="language-java"> <a t:id="home" class="nav">Back to home</a>