Author: buildbot
Date: Sun Mar 19 20:19:41 2017
New Revision: 1008639
Log:
Production update by buildbot for tapestry
Modified:
websites/production/tapestry/content/ajax-and-zones.html
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/release-notes-54.html
Modified: websites/production/tapestry/content/ajax-and-zones.html
==============================================================================
--- websites/production/tapestry/content/ajax-and-zones.html (original)
+++ websites/production/tapestry/content/ajax-and-zones.html Sun Mar 19
20:19:41 2017
@@ -197,7 +197,7 @@ void onUpdateTime()
currentTime = new Date();
 ajaxResponseRenderer.addRender(timeArea);
} </pre>
-</div></div><p>That <code>onUpdateTime</code> method is just an ordinary
Tapestry event handler, except that it uses an injected
<code>AjaxResponseRenderer</code> to tell Tapestry what zone to update when the
link is clicked.</p><h2 id="AjaxandZones-Zones">Zones</h2><p>Zones are
Tapestry's approach to performing partial page updates. A <a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Zone.html">Zone
component</a> renders as an HTML element, typically a <div>, and serves
as a marker for where dynamically-updated content should be replaced. A zone is
recognizable in the DOM because it will have the
attribute <code>data-container-type=zone</code>. The client-side support
for Zones is keyed off of this attribute and value.</p><p>Starting in Tapestry
5.4 you can use any HTML element in your template as a zone marker, by passing
its client-side id to the two-argument version of the addRender
method.</p><p><span s
tyle="line-height: 1.4285715;">A Zone updated can be triggered by an
EventLink, ActionLink or Select component, or by a Form. All of these
components support the <code>async</code> and/or <code>zone</code> parameters.
Clicking such a link will invoke an event handler method on the server as
normal ... except that a </span><em style="line-height: 1.4285715;">partial
page response</em><span style="line-height: 1.4285715;"> is sent to the client,
and the content of that response is used to update the Zone's <div> in
place.</span></p><div class="navmenu" style="float:right; background:#eee;
margin:3px; padding:0 1em">
+</div></div><p>That <code>onUpdateTime</code> method is just an ordinary
Tapestry event handler, except that it uses an injected
<code>AjaxResponseRenderer</code> to tell Tapestry what zone to update when the
link is clicked.</p><p>Since Tapestry 5.4.2, you can also easily invoke
server-side event handlers using the <code>@PublishEvents</code>
annotation and the <code>t5/core/ajax</code> JavaScript function, as
explained in the </p><h2 id="AjaxandZones-Zones">Zones</h2><p>Zones are
Tapestry's approach to performing partial page updates. A <a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Zone.html">Zone
component</a> renders as an HTML element, typically a <div>, and serves
as a marker for where dynamically-updated content should be replaced. A zone is
recognizable in the DOM because it will have the
attribute <code>data-container-type=zone</code>. The client-side support
for Zones is key
ed off of this attribute and value.</p><p>Starting in Tapestry 5.4 you can use
any HTML element in your template as a zone marker, by passing its client-side
id to the two-argument version of the addRender method.</p><p><span
style="line-height: 1.4285715;">A Zone updated can be triggered by an
EventLink, ActionLink or Select component, or by a Form. All of these
components support the <code>async</code> and/or <code>zone</code> parameters.
Clicking such a link will invoke an event handler method on the server as
normal ... except that a </span><em style="line-height: 1.4285715;">partial
page response</em><span style="line-height: 1.4285715;"> is sent to the client,
and the content of that response is used to update the Zone's <div> in
place.</span></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/ajax/actionlink"
rel="nofollow">AJAX ActionLink</a></p></div><h3
id="AjaxandZones-EventHandlerReturnTypes">Event Handler Return Types</h3><p>In
a traditional request, the return value of an event handler method may used to
determine which page will render a <em>complete</em> response, and a
<em>redirect</em> may sent to the client to render the new page (as a new
request).</p><p>In contrast, with a Zone update, the return value may used to
render a <em>partial response</em> within the <em>same request</em>.</p><div
class="confluence-information-macro confluence-information-macro-note"><span
class="aui-icon aui-icon-small aui-iconfont-warning
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Starting in Tapestry 5.3, Ajax
event handlers typically have a void return type and use AjaxResponseRenderer
to indicate which zone to update. The AjaxResponseRe
nder approach means that the <code>zone</code> parameter's value
(oridinarily indicating which zone to update) is no longer needed. Tapestry 5.4
introduced the <code>async="true"</code> parameter to avoid having to
redundantly indicate which zone to update.</p></div></div><p>If you only have
one zone to update and don't want to use AjaxResponseRenderer, you can instead
return a value from your event handler method. The simplest case is just to
return the zone's own body:</p><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;">@Inject
@@ -271,7 +271,28 @@ void onActionFromRegister()
return result;
}
</pre>
-</div></div><p>This presumes that <code>findByPartialAccountName()</code> will
sort the values, otherwise you will probably want to sort them. The
Autocomplete mixin does <em>not</em> do any sorting.</p><p>You can return an
object array, a list, even a single object. You may return objects instead of
strings ... and <code>toString()</code> will be used to convert them into
client-side strings.</p></div>
+</div></div><p>This presumes that <code>findByPartialAccountName()</code> will
sort the values, otherwise you will probably want to sort them. The
Autocomplete mixin does <em>not</em> do any sorting.</p><p>You can return an
object array, a list, even a single object. You may return objects instead of
strings ... and <code>toString()</code> will be used to convert them into
client-side strings.</p><p> </p><h2
id="AjaxandZones-Invokingserver-sideeventhandlermethodsfromJavaScript">Invoking
server-side event handler methods from JavaScript</h2><p>Tapestry 5.4.2
introduced has an API which makes it easy for server-side events to be invoked
from JavaScript. In the server-side, you first need to annotate the event
handler methods you want exposed with the
new <code>@PublishEvent</code> annotation. Then, in JavaScript, all
you need to do is to call the
existing <code>t5/core/ajax</code> function with the server-side
event name/type in the <code>url</code> 
parameter and with an <code>options</code> parameter containing
an <code>element</code> property, be it null or specifying an DOM
element to be used as the starting point for finding the event information.
Here's one example:</p><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;">public class PublishEventDemoComponent
+{
+ @OnEvent("answer")
+ @PublishEvent
+ JSONObject answer() {
+ return new JSONObject("origin", "componentAction");
+ }
+
+ @PublishEvent
+ JSONObject onAction()
+ {
+ return new JSONObject("origin", "componentAnswer");
+ }
+}
+
+</pre>
+</div></div><p>Notice that <code>answer()</code>
and <code>onAction()</code> are ordinary event handlers, with nothing
specific besides the <code>@PublishEvent</code> annotation.</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;"><div id="component"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+ <p id="componentParagraph">I'm a <strong
id="strong">component</strong></p>
+</div></pre>
+</div></div><p> </p><p> </p><p> </p><p> </p><p> </p></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/tapestry/content/release-notes-54.html
==============================================================================
--- websites/production/tapestry/content/release-notes-54.html (original)
+++ websites/production/tapestry/content/release-notes-54.html Sun Mar 19
20:19:41 2017
@@ -46,13 +46,26 @@
<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 class="external-link"
href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li><li><a
href="community.html">Community</a></li><li><a class="external-link"
href="http://www.apache.org/security/">Security</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 class="external-link"
href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li><li><a
href="community.html">Community</a></li><li><a class="external-link"
href="http://www.apache.org/security/">Security</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">Release Notes 5.4</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">Release Notes 5.4</h1></div>
+
+</div>
<div class="clearer"></div>
</div>
@@ -64,7 +77,7 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><p>This is the consolidated list
of changes between Tapestry versions 5.3 and 5.4. To upgrade to 5.4, most users
who are not using deprecated features will be able to just update the
dependency version in their Maven POM file or Gradle build script (or <a
href="download.html">download</a> the new JAR files) and the new version will
just work, although the introduction of Bootstrap CSS will require some styling
adjustments for most applications not already using Bootstrap. Please read
carefully below before upgrading, and also review the <a
href="how-to-upgrade.html">How to Upgrade</a> instructions.</p><h2
id="ReleaseNotes5.4-IncompatibleAPIs">Incompatible APIs</h2><h3
id="ReleaseNotes5.4-JavaScriptSupport">JavaScriptSupport</h3><p>Some existing
methods of JavaScriptSupport were changed from returning void, to returning the
JavaScriptSupport instance, to allow for chaining of calls. This interface is
consumed by end-user code, but not gen
erally implemented by end-user code.</p><h2
id="ReleaseNotes5.4-BreakingFeatures">Breaking Features</h2><h3
id="ReleaseNotes5.4-ClassFactoryRemoved">ClassFactory Removed</h3><p>Tapestry's
use of the <a class="external-link"
href="http://www.csg.is.titech.ac.jp/~chiba/javassist/"
rel="nofollow">Javassist</a> bytecode library has been completely removed,
along with many related services, such as <a class="external-link"
href="http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/ioc/services/ClassFactory.html">ClassFactory</a>,
that were deprecated in 5.3. Use <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/PlasticProxyFactory.html">PlasticProxyFactory</a>
instead. Most users will not be affected by this unless they relied on
Tapestry's dependency on Javassist.</p><h3
id="ReleaseNotes5.4-ClientBehaviorSupportFunctionalityRemoved">ClientBehaviorSupport
Functionality Removed</h3><p>This service collected details about
zone usage, including the client-side behavior associated with
<code>FormFragment</code>s. This interface is only kept for binary
compatibility in Tapestry 5.4; the implementation no longer does anything but
throw exceptions and will be removed in 5.5 or later.</p><h3
id="ReleaseNotes5.4-FormInjectorRemoved">FormInjector Removed</h3><p>The
FormInjector component was removed; it was intended for use only inside the
AjaxFormLoop component (which was rewritten in 5.4 and no longer uses
FormInjector). FormInjector was not widely used elsewhere, if it was used at
all.</p><h3
id="ReleaseNotes5.4-MarkupWriterFactoryAPIChanged">MarkupWriterFactory API
Changed</h3><p>The <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/MarkupWriterFactory.html">MarkupWriterFactory</a>
interface has 3 new methods, added to support the HTML5 rules for element
endings. If you have any classes that <em>implement</em> MarkupWriterFactory
(which is rare), the
y'll need to be modified to implement the new methods. As noted in the <a
class="external-link"
href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/services/ClientBehaviorSupport.html">Javadocs</a>,
use JavaScriptSupport directly instead.</p><h3
id="ReleaseNotes5.4-InjectedScriptsatBottom">Injected Scripts at
Bottom</h3><p>In prior versions of Tapestry, JavaScript libraries injected into
the page (via the @<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Import.html">Import</a>
annotation, or via <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptSupport.html">JavaScriptSupport</a>),
were injected into the <head> element of the HTML page, either at the
end of the element, or before any existing <script> element.</p><p>With
this release, the Tapestry integrates with <a class="external-link"
href="http://requirejs.org/" rel="
nofollow">RequireJS</a> to dynamically load libraries. This may affect a small
number of JavaScript libraries, such as <a class="external-link"
href="http://www.google.com/analytics/" rel="nofollow">Google Analytics</a>
that need to be placed at the top of the page; in those cases, the library
should be added to the template of your application's main layout component,
instead of relying on @Import and JavaScriptSupport.</p><h3
id="ReleaseNotes5.4-NoRedirectOnFormValidationErrors">No Redirect On Form
Validation Errors</h3><p>In prior releases of Tapestry, when a client-side form
was submitted and there were server-side validation errors, Tapestry would
perform a redirect-after-post to re-render the page; this meant that the <a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ValidationTracker.html">ValidationTracker</a>
object that stores validation errors would, itself, need to persist to the new
render request, causing a server-side ses
sion to be created. Starting in 5.4, the default behavior for server-side
validation exceptions is to re-render the page content immediately, within the
same request; this obviates the need to use a persistent field to store the
tracker.</p><h2 id="ReleaseNotes5.4-NewFeatures">New Features</h2><h3
id="ReleaseNotes5.4-Componentfieldvisibility">Component field
visibility</h3><p>In prior versions of Tapestry, all instance fields of
components had to be visibility private; starting with versions 5.3.2 and 5.4,
this has been relaxed. Component fields may be protected, or package private
(that is, no visibility modifier). Fields that are final, or annotated with @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Retain.html">Retain</a>
may even be public. In any case, this makes it easier for pages to work with
other pages in the same package, and for subclasses to more easily access the
fields (including parameter fields, or injec
tions) provided by base classes. This feature should be used with care, as it
can lead to designs that are more difficult to maintain.</p><h3
id="ReleaseNotes5.4-JavaScriptModules">JavaScript Modules</h3><p>Prior releases
of Tapestry primarily organized client-side logic in terms of JavaScript
libraries. These libraries can be declaratively imported into the page (either
during a full-page render, or during an Ajax partial page update). In addition,
libraries can be combined together into <em>stacks</em>, which (in a production
application) are combined into a single virtual asset.</p><p>The library
approach is <a href="javascript-rewrite-in-54.html">fundamentally limited in a
number of ways</a>, including namespace pollution and dealing with dependencies
between libraries. Tapestry 5.4 introduces a parallel mechanism, based on <a
class="external-link" href="http://requirejs.org" rel="nofollow">RequireJS</a>
and the <a class="external-link" href="https://github.com/amdjs/amdjs-ap
i/wiki/AMD" rel="nofollow">Asynchronous Module Definition</a> as a way to
speed up initial page load and organize client-side JavaScript in a more
expressive and maintainable way.</p><h2> Sub-task
+ <div id="ConfluenceContent"><p>This is the consolidated list
of changes between Tapestry versions 5.3 and 5.4. To upgrade to 5.4, most users
who are not using deprecated features will be able to just update the
dependency version in their Maven POM file or Gradle build script (or <a
href="download.html">download</a> the new JAR files) and the new version will
just work, although the introduction of Bootstrap CSS will require some styling
adjustments for most applications not already using Bootstrap. Please read
carefully below before upgrading, and also review the <a
href="how-to-upgrade.html">How to Upgrade</a> instructions.</p><h2
id="ReleaseNotes5.4-IncompatibleAPIs">Incompatible APIs</h2><h3
id="ReleaseNotes5.4-JavaScriptSupport">JavaScriptSupport</h3><p>Some existing
methods of JavaScriptSupport were changed from returning void, to returning the
JavaScriptSupport instance, to allow for chaining of calls. This interface is
consumed by end-user code, but not gen
erally implemented by end-user code.</p><h2
id="ReleaseNotes5.4-BreakingFeatures">Breaking Features</h2><h3
id="ReleaseNotes5.4-ClassFactoryRemoved">ClassFactory Removed</h3><p>Tapestry's
use of the <a class="external-link"
href="http://www.csg.is.titech.ac.jp/~chiba/javassist/"
rel="nofollow">Javassist</a> bytecode library has been completely removed,
along with many related services, such as <a class="external-link"
href="http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/ioc/services/ClassFactory.html">ClassFactory</a>,
that were deprecated in 5.3. Use <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/PlasticProxyFactory.html">PlasticProxyFactory</a>
instead. Most users will not be affected by this unless they relied on
Tapestry's dependency on Javassist.</p><h3
id="ReleaseNotes5.4-ClientBehaviorSupportFunctionalityRemoved">ClientBehaviorSupport
Functionality Removed</h3><p>This service collected details about
zone usage, including the client-side behavior associated with
<code>FormFragment</code>s. This interface is only kept for binary
compatibility in Tapestry 5.4; the implementation no longer does anything but
throw exceptions and will be removed in 5.5 or later.</p><h3
id="ReleaseNotes5.4-FormInjectorRemoved">FormInjector Removed</h3><p>The
FormInjector component was removed; it was intended for use only inside the
AjaxFormLoop component (which was rewritten in 5.4 and no longer uses
FormInjector). FormInjector was not widely used elsewhere, if it was used at
all.</p><h3
id="ReleaseNotes5.4-MarkupWriterFactoryAPIChanged">MarkupWriterFactory API
Changed</h3><p>The <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/MarkupWriterFactory.html">MarkupWriterFactory</a>
interface has 3 new methods, added to support the HTML5 rules for element
endings. If you have any classes that <em>implement</em> MarkupWriterFactory
(which is rare), the
y'll need to be modified to implement the new methods. As noted in the <a
class="external-link"
href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/services/ClientBehaviorSupport.html">Javadocs</a>,
use JavaScriptSupport directly instead.</p><h3
id="ReleaseNotes5.4-InjectedScriptsatBottom">Injected Scripts at
Bottom</h3><p>In prior versions of Tapestry, JavaScript libraries injected into
the page (via the @<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Import.html">Import</a>
annotation, or via <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptSupport.html">JavaScriptSupport</a>),
were injected into the <head> element of the HTML page, either at the
end of the element, or before any existing <script> element.</p><p>With
this release, the Tapestry integrates with <a class="external-link"
href="http://requirejs.org/" rel="
nofollow">RequireJS</a> to dynamically load libraries. This may affect a small
number of JavaScript libraries, such as <a class="external-link"
href="http://www.google.com/analytics/" rel="nofollow">Google Analytics</a>
that need to be placed at the top of the page; in those cases, the library
should be added to the template of your application's main layout component,
instead of relying on @Import and JavaScriptSupport.</p><h3
id="ReleaseNotes5.4-NoRedirectOnFormValidationErrors">No Redirect On Form
Validation Errors</h3><p>In prior releases of Tapestry, when a client-side form
was submitted and there were server-side validation errors, Tapestry would
perform a redirect-after-post to re-render the page; this meant that the <a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ValidationTracker.html">ValidationTracker</a>
object that stores validation errors would, itself, need to persist to the new
render request, causing a server-side ses
sion to be created. Starting in 5.4, the default behavior for server-side
validation exceptions is to re-render the page content immediately, within the
same request; this obviates the need to use a persistent field to store the
tracker.</p><h2 id="ReleaseNotes5.4-NewFeatures">New Features</h2><h3
id="ReleaseNotes5.4-Componentfieldvisibility">Component field
visibility</h3><p>In prior versions of Tapestry, all instance fields of
components had to be visibility private; starting with versions 5.3.2 and 5.4,
this has been relaxed. Component fields may be protected, or package private
(that is, no visibility modifier). Fields that are final, or annotated with @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Retain.html">Retain</a>
may even be public. In any case, this makes it easier for pages to work with
other pages in the same package, and for subclasses to more easily access the
fields (including parameter fields, or injec
tions) provided by base classes. This feature should be used with care, as it
can lead to designs that are more difficult to maintain.</p><h3
id="ReleaseNotes5.4-JavaScriptModules">JavaScript Modules</h3><p>Prior releases
of Tapestry primarily organized client-side logic in terms of JavaScript
libraries. These libraries can be declaratively imported into the page (either
during a full-page render, or during an Ajax partial page update). In addition,
libraries can be combined together into <em>stacks</em>, which (in a production
application) are combined into a single virtual asset.</p><p>The library
approach is <a href="javascript-rewrite-in-54.html">fundamentally limited in a
number of ways</a>, including namespace pollution and dealing with dependencies
between libraries. Tapestry 5.4 introduces a parallel mechanism, based on <a
class="external-link" href="http://requirejs.org" rel="nofollow">RequireJS</a>
and the <a class="external-link" href="https://github.com/amdjs/amdjs-ap
i/wiki/AMD" rel="nofollow">Asynchronous Module Definition</a> as a way to
speed up initial page load and organize client-side JavaScript in a more
expressive and maintainable way.</p><h3
id="ReleaseNotes5.4-Client-sideAPIforinvokingserver-sideevents">Client-side API
for invoking server-side events</h3><p>Tapestry 5.4.2 adds an API which makes
it easy for server-side events to be invoked from JavaScript. In the
server-side, you first need to annotate the event handler methods you want
exposed with the new <code>@PublishEvent</code> annotation. Then, in JS,
all you need to do is to call the <code>t5/core/ajax</code> function
with the server-side event name/type in the <code>url</code> parameter
and with an <code>options</code> parameter containing
an <code>element</code> property, be it null or specifying an DOM element
to be used as the starting point for finding the event information. More
details in the <a class="external-link" href="http://tapes
try.apache.org/ajax-and-zones.html">Ajax and Zones page</a>.</p><h2>
Sub-task
</h2>
<ul><li>[<a
href="https://issues.apache.org/jira/browse/TAP5-2445">TAP5-2445</a>] -
Reduce usage of PerthreadMap in AbstractConditional
</li><li>[<a
href="https://issues.apache.org/jira/browse/TAP5-2446">TAP5-2446</a>] -
Use ObjectCreator instead of PerThreadValue when appropriate