Modified: websites/production/tapestry/content/persistent-page-data.html
==============================================================================
--- websites/production/tapestry/content/persistent-page-data.html (original)
+++ websites/production/tapestry/content/persistent-page-data.html Wed Sep 20
12:29:16 2017
@@ -27,6 +27,16 @@
</title>
<link type="text/css" rel="stylesheet" href="/resources/space.css" />
+ <link href='/resources/highlighter/styles/shCoreCXF.css'
rel='stylesheet' type='text/css' />
+ <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet'
type='text/css' />
+ <script src='/resources/highlighter/scripts/shCore.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushJava.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushXml.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushPlain.js'
type='text/javascript'></script>
+ <script>
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
<link href="/styles/style.css" rel="stylesheet" type="text/css"/>
@@ -67,23 +77,106 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><rich-text-body><p>The use of the
term "persistence" here refers to <em>page-level</em> persistence, NOT database
persistence.</p></rich-text-body><p>Most instance variables in Tapestry are
automatically cleared at the end of each request. This is important, as it
pertains to how Tapestry pages are shared, over time, by many
users.</p><parameter ac:name="style">float:right</parameter><parameter
ac:name="title">Related Articles</parameter><parameter
ac:name="class">aui-label</parameter><rich-text-body><parameter
ac:name="showLabels">false</parameter><parameter
ac:name="showSpace">false</parameter><parameter ac:name="title">Related
Articles</parameter><parameter ac:name="cql">label = "persistence" and space =
currentSpace()</parameter></rich-text-body><p>However, you often want to store
some data on a <em>single</em> page, and have access to it in later requests to
that same page, without having to store it in a database between requests. (T
o store values across multiple pages, see <a
href="session-storage.html">Session Storage</a>.)</p><p>Making page data
persist across requests to a single page is accomplished with the @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html">Persist</a>
annotation. This annotation is applied to private instance fields of
components:</p><parameter ac:name="">java</parameter><plain-text-body> @Persist
+ <div id="ConfluenceContent"><div
class="confluence-information-macro
confluence-information-macro-information"><span class="aui-icon aui-icon-small
aui-iconfont-info confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>The use of the term "persistence"
here refers to <em>page-level</em> persistence, NOT database
persistence.</p></div></div><p>Most instance variables in Tapestry are
automatically cleared at the end of each request. This is important, as it
pertains to how Tapestry pages are shared, over time, by many users.</p><div
class="aui-label" style="float:right" title="Related Articles">
+
+
+
+
+
+
+
+
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small
aui-iconfont-page-default" title="Page">Page:</span> </div>
+
+ <div class="details">
+ <a href="performance-and-clustering.html">Performance
and Clustering</a>
+
+
+ </div>
+ </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small
aui-iconfont-page-default" title="Page">Page:</span> </div>
+
+ <div class="details">
+ <a href="session-storage.html">Session Storage</a>
+
+
+ </div>
+ </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small
aui-iconfont-page-default" title="Page">Page:</span> </div>
+
+ <div class="details">
+ <a href="persistent-page-data.html">Persistent Page
Data</a>
+
+
+ </div>
+ </li></ul>
+</div>
+
+
+<p>However, you often want to store some data on a <em>single</em> page, and
have access to it in later requests to that same page, without having to store
it in a database between requests. (To store values across multiple pages, see
<a href="session-storage.html">Session Storage</a>.)</p><p>Making page data
persist across requests to a single page is accomplished with the @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html">Persist</a>
annotation. This annotation is applied to private instance fields of
components:</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;"> @Persist
private int value;
-</plain-text-body><p>Such annotated fields will retain their state between
requests. Generally, speaking, this means that the value is stored into the
session (but other approaches are possible).</p><p>Whenever you make a change
to a persistent field, its value is saved. On later requests to the same page,
the value for the field is restored.</p><h2
id="PersistentPageData-PersistenceStrategies">Persistence Strategies</h2><p>The
value for each field is the <em>strategy</em> used to store the field between
requests.</p><h3 id="PersistentPageData-SessionStrategy">Session
Strategy</h3><p><plain-text-body>{float:right|background=#eee|padding=0 1em}
- *JumpStart Demo:*
- [Storing Data in a
Page|http://jumpstart.doublenegative.com.au/jumpstart/examples/state/storingdatainapage]
- [Passing Data Between
Pages|http://jumpstart.doublenegative.com.au/jumpstart/examples/state/passingdatabetweenpages]
-{float}</plain-text-body>The session strategy stores field changes into the
session; the session is created as necessary. Session strategy is the default
strategy used unless otherwise overridden.</p><p>A suitably long session
attribute name is used; it incorporates the name of the page, the nested
component id, and the name of the field.</p><parameter ac:name="title">Example:
Session Strategy</parameter><plain-text-body> @Persist
+</pre>
+</div></div><p>Such annotated fields will retain their state between requests.
Generally, speaking, this means that the value is stored into the session (but
other approaches are possible).</p><p>Whenever you make a change to a
persistent field, its value is saved. On later requests to the same page, the
value for the field is restored.</p><h2
id="PersistentPageData-PersistenceStrategies">Persistence Strategies</h2><p>The
value for each field is the <em>strategy</em> used to store the field between
requests.</p><h3 id="PersistentPageData-SessionStrategy">Session
Strategy</h3><p></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/state/storingdatainapage"
rel="nofollow">Storing Data in a Page</a><br clear="none">
+ <a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/state/passingdatabetweenpages"
rel="nofollow">Passing Data Between Pages</a></p></div>The session strategy
stores field changes into the session; the session is created as necessary.
Session strategy is the default strategy used unless otherwise overridden.<p>A
suitably long session attribute name is used; it incorporates the name of the
page, the nested component id, and the name of the field.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>Example: Session Strategy</b></div><div
class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> @Persist
private int value;
-</plain-text-body><h3 id="PersistentPageData-FlashStrategy">Flash
Strategy</h3><p>The flash strategy stores information in the session as well,
just for not very long. Values are stored into the session, but then deleted
from the session as they are first used to restore a page's state.</p><p>The
flash is typically used to store temporary messages that should only be
displayed to the user once.</p><parameter ac:name="title">Example: Flash
Strategy</parameter><plain-text-body> @Persist(PersistenceConstants.FLASH)
+</pre>
+</div></div><h3 id="PersistentPageData-FlashStrategy">Flash
Strategy</h3><p>The flash strategy stores information in the session as well,
just for not very long. Values are stored into the session, but then deleted
from the session as they are first used to restore a page's state.</p><p>The
flash is typically used to store temporary messages that should only be
displayed to the user once.</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width:
1px;"><b>Example: Flash Strategy</b></div><div class="codeContent panelContent
pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> @Persist(PersistenceConstants.FLASH)
private int value;
-</plain-text-body><h3 id="PersistentPageData-ClientStrategy">Client
Strategy</h3><p>The field is persisted onto the client; you will see an
additional query parameter in each URL (or an extra hidden field in each
form).</p><p>Client persistence is somewhat expensive. It can bloat the size of
the rendered pages by adding hundreds of characters to each link. There is
extra processing on each request to de-serialize the values encoded into the
query parameter.</p><p>Client persistence does not scale very well; as more
information is stored into the query parameter, its length can become
problematic. In many cases, web browsers, firewalls or other servers may
silently truncate the URL which will break the application.</p><p>Use client
persistence with care, and store a minimal amount of data. Try to store the
identity (that is, primary key) of an object, rather than the object
itself.</p><parameter ac:name="title">Example: Client
Strategy</parameter><plain-text-body> @Persist(Persisten
ceConstants.CLIENT)
+</pre>
+</div></div><h3 id="PersistentPageData-ClientStrategy">Client
Strategy</h3><p>The field is persisted onto the client; you will see an
additional query parameter in each URL (or an extra hidden field in each
form).</p><p>Client persistence is somewhat expensive. It can bloat the size of
the rendered pages by adding hundreds of characters to each link. There is
extra processing on each request to de-serialize the values encoded into the
query parameter.</p><p>Client persistence does not scale very well; as more
information is stored into the query parameter, its length can become
problematic. In many cases, web browsers, firewalls or other servers may
silently truncate the URL which will break the application.</p><p>Use client
persistence with care, and store a minimal amount of data. Try to store the
identity (that is, primary key) of an object, rather than the object
itself.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeHeader panelHeader pdl" style="bord
er-bottom-width: 1px;"><b>Example: Client Strategy</b></div><div
class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> @Persist(PersistenceConstants.CLIENT)
private int value;
-</plain-text-body><h3
id="PersistentPageData-HibernateEntityStrategy">Hibernate Entity
Strategy</h3><p><span style="line-height: 1.4285715;">Entity persistence is
provided by the tapestry-hibernate module (which extends Tapestry with new
features).</span></p><p>In Entity persistence, the field should store a
Hibernate entity instance.</p><parameter ac:name="title">"Hibernate Entity
Strategy"</parameter><plain-text-body>
@Persist(HibernatePersistenceConstants.ENTITY)
- private User user;</plain-text-body><p> </p><p>The value stored in the
HttpSession is a <em>token</em> for the entity: its Java class name and
primary key. When the field is restored in a later request, the entity is
re-instantiated using that data.</p><p>What is <em>not</em> stored is any
changes to the persistent entity that are not committed to the external
datastore (the database).</p><p>Starting in Tapestry 5.4, it is possible to
store a non-persistent entity (a transient entity). A transient entity is
stored directly into the HttpSession, and should be Serializable if the
application is clustered.</p><h3 id="PersistentPageData-JPAEntityStrategy">JPA
Entity Strategy</h3><p>The tapestry-jpa module uses a similar strategy.
However, at the current time it can only store a persisted entity (one that has
been saved to the database and has a primary key).</p><parameter
ac:name="title">"Example: JPA Entity Strategy"</parameter><plain-text-body>
@Persist(JpaPersistenc
eConstants.ENTITY)
- private Account account;</plain-text-body><p><span style="color:
rgb(83,145,38);font-size: 20.0px;line-height: 1.5;">Persistence Strategy
Inheritance</span></p><p>By default the value for the Persist annotation is the
empty string. When this is true, then the actual strategy to be used is
determined by a search up the component hierarchy.</p><p>For each component,
the meta-data property <code>tapestry.persistence-strategy</code> is checked.
This can be specified using the <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Meta.html">Meta</a>
annotation.</p><p>If the value is non-blank, then that strategy is used. This
allows a component to control the persistence strategy used inside any
sub-components (that don't explicitly use a different strategy).</p><p>In any
case, if no component provides the meta data, then the ultimate default,
"session", is used.</p><h2 id="PersistentPageData-DefaultValues">Default
Values</h2><p>Fie
lds marked with @Persist may not have default values (whether set inline, or
inside a constructor).</p><h2
id="PersistentPageData-ClearingPersistentFields">Clearing Persistent
Fields</h2><p>If you reach a point where you know that all data for a page can
be discarded, you can do exactly that.</p><p>The method
<code>discardPersistentFieldChanges()</code> of ComponentResources will discard
all persistent fields for the page, regardless of which strategy is used to
store the property. This will not affect the page in memory, but takes effect
for subsequent requests.</p><p><parameter ac:name=""><a
href="clustering-issues.html">Clustering Issues</a></parameter></p><parameter
ac:name="title">Example: Entity Session Strategy</parameter><plain-text-body>
@Persist(HibernatePersistenceConstants.ENTITY)
- private User user;</plain-text-body><parameter ac:name="title">"Example:JAP
Session Strategy"</parameter><plain-text-body>
@Persist(JpaPersistenceConstants.ENTITY)
- private Account account;</plain-text-body></div>
+</pre>
+</div></div><h3 id="PersistentPageData-HibernateEntityStrategy">Hibernate
Entity Strategy</h3><p><span style="line-height: 1.4285715;">Entity persistence
is provided by the tapestry-hibernate module (which extends Tapestry with new
features).</span></p><p>In Entity persistence, the field should store a
Hibernate entity instance.</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width:
1px;"><b>"Hibernate Entity Strategy"</b></div><div class="codeContent
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> @Persist(HibernatePersistenceConstants.ENTITY)
+ private User user;</pre>
+</div></div><p> </p><p>The value stored in the HttpSession is
a <em>token</em> for the entity: its Java class name and primary key. When
the field is restored in a later request, the entity is re-instantiated using
that data.</p><p>What is <em>not</em> stored is any changes to the
persistent entity that are not committed to the external datastore (the
database).</p><p>Starting in Tapestry 5.4, it is possible to store a
non-persistent entity (a transient entity). A transient entity is stored
directly into the HttpSession, and should be Serializable if the application is
clustered.</p><h3 id="PersistentPageData-JPAEntityStrategy">JPA Entity
Strategy</h3><p>The tapestry-jpa module uses a similar strategy. However, at
the current time it can only store a persisted entity (one that has been saved
to the database and has a primary key).</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeHeader panelHeader pdl"
style="border-bottom-width: 1px;"><b>"Exa
mple: JPA Entity Strategy"</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> @Persist(JpaPersistenceConstants.ENTITY)
+ private Account account;</pre>
+</div></div><p><span style="color: rgb(83,145,38);font-size:
20.0px;line-height: 1.5;">Persistence Strategy Inheritance</span></p><p>By
default the value for the Persist annotation is the empty string. When this is
true, then the actual strategy to be used is determined by a search up the
component hierarchy.</p><p>For each component, the meta-data property
<code>tapestry.persistence-strategy</code> is checked. This can be specified
using the <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Meta.html">Meta</a>
annotation.</p><p>If the value is non-blank, then that strategy is used. This
allows a component to control the persistence strategy used inside any
sub-components (that don't explicitly use a different strategy).</p><p>In any
case, if no component provides the meta data, then the ultimate default,
"session", is used.</p><h2 id="PersistentPageData-DefaultValues">Default
Values</h2><p>Fields marked with @Persist may not
have default values (whether set inline, or inside a constructor).</p><h2
id="PersistentPageData-ClearingPersistentFields">Clearing Persistent
Fields</h2><p>If you reach a point where you know that all data for a page can
be discarded, you can do exactly that.</p><p>The method
<code>discardPersistentFieldChanges()</code> of ComponentResources will discard
all persistent fields for the page, regardless of which strategy is used to
store the property. This will not affect the page in memory, but takes effect
for subsequent requests.</p><p></p><h2
id="PersistentPageData-ClusteringIssues">Clustering Issues</h2>
+
+<p>The Servlet API was designed with the intention that there would be only a
modest amount of server-side state, and that the stored values would be
individual numbers and strings, and thus, immutable.</p>
+
+<p>However, many web applications do not use the HttpSession this way, instead
storing large, mutable objects in the session. This is not a problem for single
servers, but in a cluster, anything stored in the session must be serialized to
a bytestream and distributed to other servers within the cluster, and restored
there.</p>
+
+<p>Most application servers perform that serialization and distribution
whenever HttpSession.setAttribute() is called. This creates a data consistency
problem for mutable objects, because if you read a mutable session object,
change its state, but <em>don't</em> invoke setAttribute(), the changes will be
isolated to just a single server in the cluster.</p>
+
+<p>Tapestry attempts to solve this: any session-persisted object that is read
during a request will be re-stored back into the HttpSession at the end of the
request. This ensures that changed internal state of those mutable objects is
properly replicated around the cluster.</p>
+
+<p>But while this solution solves the data consistency problem, it does so at
the expense of performance, since all of those calls to setAttribute() result
in extra session data being replicated needlessly if the internal state of the
mutable object hasn't changed.</p>
+
+<p>Tapestry has solutions to this, too:</p>
+
+<h3
id="PersistentPageData-@ImmutableSessionPersistedObjectAnnotation">@ImmutableSessionPersistedObject
Annotation</h3>
+
+<p>Tapestry knows that Java's String, Number and Boolean classes are
immutable. Immutable objects do not require a re-store into the session.</p>
+
+<p>You can mark your own session objects as immutable (and thus not requiring
session replication) using the <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/ImmutableSessionPersistedObject.html">ImmutableSessionPersistedObject</a>
annotation.</p>
+
+<h3
id="PersistentPageData-OptimizedSessionPersistedObjectInterface">OptimizedSessionPersistedObject
Interface</h3>
+
+<p>The <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/OptimizedSessionPersistedObject">OptimizedSessionPersistedObject</a>
interface allows an object to control this behavior. An object with this
interface can track when its mutable state changes. Typically, you should
extend from the <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/BaseOptimizedSessionPersistedObject.html">BaseOptimizedSessionPersistedObject</a>
base class.</p>
+
+<h3
id="PersistentPageData-SessionPersistedObjectAnalyzerService">SessionPersistedObjectAnalyzer
Service</h3>
+
+<p>The <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/SessionPersistedObjectAnalyzer.html">SessionPersistedObjectAnalyzer</a>
service is ultimately responsible for determining whether a session persisted
object is dirty or not (dirty meaning in need of a restore into the session).
This is an extensible service where new strategies, for new classes, can be
introduced.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeHeader panelHeader pdl" style="border-bottom-width:
1px;"><b>Example: Entity Session Strategy</b></div><div class="codeContent
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> @Persist(HibernatePersistenceConstants.ENTITY)
+ private User user;</pre>
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div
class="codeHeader panelHeader pdl" style="border-bottom-width:
1px;"><b>"Example:JAP Session Strategy"</b></div><div class="codeContent
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> @Persist(JpaPersistenceConstants.ENTITY)
+ private Account account;</pre>
+</div></div></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/pipelinebuilder-service.html
==============================================================================
--- websites/production/tapestry/content/pipelinebuilder-service.html (original)
+++ websites/production/tapestry/content/pipelinebuilder-service.html Wed Sep
20 12:29:16 2017
@@ -27,6 +27,14 @@
</title>
<link type="text/css" rel="stylesheet" href="/resources/space.css" />
+ <link href='/resources/highlighter/styles/shCoreCXF.css'
rel='stylesheet' type='text/css' />
+ <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet'
type='text/css' />
+ <script src='/resources/highlighter/scripts/shCore.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushJava.js'
type='text/javascript'></script>
+ <script>
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
<link href="/styles/style.css" rel="stylesheet" type="text/css"/>
@@ -36,26 +44,13 @@
<div class="wrapper bs">
- <div id="navigation"><div class="nav"><ul class="alternate"><li><a
href="index.html">Home</a></li><li><a href="getting-started.html">Getting
Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a
href="download.html">Download</a></li><li><a
href="about.html">About</a></li><li><a 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">PipelineBuilder Service</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">PipelineBuilder Service</h1></div></div>
<div class="clearer"></div>
</div>
@@ -67,7 +62,32 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><p>The <strong>PipelineBuilder
Service</strong> is a service used to create pipelines, also known as
<em>filter chains</em>. An example of this is the Filter and FilterChain
interfaces inside the Servlet API.</p><parameter
ac:name="style">float:right</parameter><parameter ac:name="title">Related
Articles</parameter><parameter
ac:name="class">aui-label</parameter><rich-text-body><parameter
ac:name="showLabels">false</parameter><parameter
ac:name="showSpace">false</parameter><parameter ac:name="title">Related
Articles</parameter><parameter ac:name="cql">label = "service-builders" and
space = currentSpace()</parameter></rich-text-body><p>In this pattern, an
existing service is decorated with a filter. The filter will delegate to the
service, but has the chance to alter or replace parameters before invoking the
method, and can perform operations before returning. This is similar to <a
href="chainbuilder-service.html">chain of responsibility</
a>, but differs in that there are two interfaces (the service interface and
the filter interface) and that each filter invokes the next filter via the
service interface. In contrast, in the chain of responsibility, the chain
invokes each method, which must return before the next command in the chain is
invoked.</p><p>The service interface and the filter interface are closely
related: the filter interface must match the service interface method for
method, but each method of the filter interface must have an additional
parameter whose type is the service interface. For example, a pipeline that
performed string transformations might use the following
interfaces:</p><parameter ac:name="">java</parameter><plain-text-body>public
interface StringTransformService
+ <div id="ConfluenceContent"><p>The <strong>PipelineBuilder
Service</strong> is a service used to create pipelines, also known as
<em>filter chains</em>. An example of this is the Filter and FilterChain
interfaces inside the Servlet API.</p><div class="aui-label"
style="float:right" title="Related Articles"><h3>Related Articles</h3><ul
class="content-by-label"><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="shadowbuilder-service.html">ShadowBuilder Service</a>
+ </div> </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="strategybuilder-service.html">StrategyBuilder Service</a>
+ </div> </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="pipelinebuilder-service.html">PipelineBuilder Service</a>
+ </div> </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="chainbuilder-service.html">ChainBuilder Service</a>
+ </div> </li></ul></div><p>In this pattern, an existing service is decorated
with a filter. The filter will delegate to the service, but has the chance to
alter or replace parameters before invoking the method, and can perform
operations before returning. This is similar to <a
href="chainbuilder-service.html">chain of responsibility</a>, but differs in
that there are two interfaces (the service interface and the filter interface)
and that each filter invokes the next filter via the service interface. In
contrast, in the chain of responsibility, the chain invokes each method, which
must return before the next command in the chain is invoked.</p><p>The service
interface and the filter interface are closely related: the filter interface
must match the service interface method for method, but each method of the
filter interface must have an additional parameter whose type is the service
interface. For example, a pipeline that performed string transformations might
use the following in
terfaces:</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 interface StringTransformService
{
String transform(String input);
}
@@ -75,19 +95,25 @@
public interface StringTransformFilter
{
String transform(String input, StringTransformService delegate);
-}</plain-text-body><p>An implementation of the filter might look
like:</p><parameter ac:name="">java</parameter><plain-text-body>public class
UpcasePreFilter implements StringTransformFilter
+}</pre>
+</div></div><p>An implementation of the filter might look like:</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 UpcasePreFilter implements
StringTransformFilter
{
public String transform(String input, StringTransformService delegate)
{
return delegate.transform(input.toUpperCase());
}
-}</plain-text-body><p>Alternately, the filter could pass input to delegate
unchanged, but invoke toUpperCase() on the result:</p><parameter
ac:name="">java</parameter><plain-text-body>public class UpcasePostFilter
implements StringTransformFilter
+}</pre>
+</div></div><p>Alternately, the filter could pass input to delegate unchanged,
but invoke toUpperCase() on the result:</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 UpcasePostFilter implements
StringTransformFilter
{
public String transform(String input, StringTransformService delegate)
{
return delegate.transform(input).toUpperCase();
}
-}</plain-text-body><p>The PipelineBuilder Service (<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/PipelineBuilder.html">API</a>)
is useful for constructing pipelines. The service is often injected into a
service builder method, along with an ordered configuration of
services.</p><p>What the builder accomplishes is to represent each
<em>filter</em> in the pipeline as an instance of the <em>service</em>
interface.</p><p><span class="confluence-embedded-file-wrapper"><img
class="confluence-embedded-image"
src="pipelinebuilder-service.data/PipelineCallingSequence.png"></span><br
clear="none"> Pipeline Calling Sequence</p><p>The bridges are created by the
PipelineBuilder service. The terminator must be provided. The bridges and the
terminator implement the service interface.</p><parameter
ac:name="">java</parameter><plain-text-body> public static
StringTransformService build(
+}</pre>
+</div></div><p>The PipelineBuilder Service (<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/services/PipelineBuilder.html">API</a>)
is useful for constructing pipelines. The service is often injected into a
service builder method, along with an ordered configuration of
services.</p><p>What the builder accomplishes is to represent each
<em>filter</em> in the pipeline as an instance of the <em>service</em>
interface.</p><p><span class="confluence-embedded-file-wrapper"><img
class="confluence-embedded-image"
src="pipelinebuilder-service.data/PipelineCallingSequence.png"></span><br
clear="none"> Pipeline Calling Sequence</p><p>The bridges are created by the
PipelineBuilder service. The terminator must be provided. The bridges and the
terminator implement the service interface.</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 static StringTransformService build(
@InjectService("PipelineBuilder")
PipelineBuilder builder,
List<StringTransformFilter> configuration,
@@ -106,7 +132,8 @@ public interface StringTransformFilter
StringTransformService.class, StringTransformFilter.class,
configuration,
terminator);
- } </plain-text-body><p>Here, we create the terminator for the pipeline
as an inner class instance, and feed that into the builder. The result is a new
service that encapsulates the entire pipeline. When there are no filters, this
is just the terminator.</p><p> </p><p></p></div>
+ } </pre>
+</div></div><p>Here, we create the terminator for the pipeline as an inner
class instance, and feed that into the builder. The result is a new service
that encapsulates the entire pipeline. When there are no filters, this is just
the terminator.</p><p> </p><p></p></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/principles.html
==============================================================================
--- websites/production/tapestry/content/principles.html (original)
+++ websites/production/tapestry/content/principles.html Wed Sep 20 12:29:16
2017
@@ -27,6 +27,14 @@
</title>
<link type="text/css" rel="stylesheet" href="/resources/space.css" />
+ <link href='/resources/highlighter/styles/shCoreCXF.css'
rel='stylesheet' type='text/css' />
+ <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet'
type='text/css' />
+ <script src='/resources/highlighter/scripts/shCore.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushJava.js'
type='text/javascript'></script>
+ <script>
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
<link href="/styles/style.css" rel="stylesheet" type="text/css"/>
@@ -36,26 +44,13 @@
<div class="wrapper bs">
- <div id="navigation"><div class="nav"><ul class="alternate"><li><a
href="index.html">Home</a></li><li><a href="getting-started.html">Getting
Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a
href="download.html">Download</a></li><li><a
href="about.html">About</a></li><li><a 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">Principles</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">Principles</h1></div></div>
<div class="clearer"></div>
</div>
@@ -67,7 +62,38 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><parameter
ac:name="style">float:right</parameter><parameter ac:name="title">Related
Articles</parameter><parameter
ac:name="class">aui-label</parameter><rich-text-body><parameter
ac:name="showLabels">false</parameter><parameter
ac:name="showSpace">false</parameter><parameter ac:name="title">Related
Articles</parameter><parameter ac:name="cql">label = "new-users" and space =
currentSpace()</parameter></rich-text-body><h1
id="Principles-Principle1–StaticStructure,DynamicBehavior">Principle 1
– Static Structure, Dynamic Behavior</h1><p>The concept of "Dynamic
Behavior" should be pretty obvious when you are building a web application;
things should look different for different users/situations. But what does it
mean that Tapestry has "Static Structure?" Static structure implies that when
you build a page in Tapestry you are going to define all of the types of
components that are used within that page. Under no circumstance during
the rendering or event processing of the page will you be able to dynamically
create a new type of component and place that into the component tree.</p><p>At
first glance, this seems quite limiting ... other frameworks allow new elements
to be created on the fly; it's also a common feature of desktop GUIs such as
Swing. But static structure turns out to be not so limiting after all. You
<em>can</em> create new elements (you're actually re-rendering existing
components with different properties). And you have plenty of options for
getting dynamic behavior out of your static structure; from the simple
conditional and looping components to the more advanced implementations of
Tapestry's BeanEditor or Grid components, Tapestry gives you control over what
renders and when, and even where it appears on the page. And starting in
Tapestry 5.3 you can even use the <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Dynamic.html">
Dynamic component</a>, which renders whatever is in an external template
file.</p><p>Why did Tapestry choose static structure as a core principle? It's
really a matter of meeting the requirements of agility and scalability.</p><h2
id="Principles-Agility">Agility</h2><p>Tapestry is designed to be an agile
working environment; "code less, deliver more". To support you writing less
code Tapestry does a lot of work on your POJO pages and components when first
loading them. It also uses shared instances of page and component classes
(shared across multiple threads and requests). Having dynamically modifiable
structure would imply that each request has its own instance and, further, that
the entire structure would need to be serialized between requests so that it
can be restored to handle later requests.</p><p>Tapestry also makes you more
agile by speeding up the development cycle with <a
href="class-reloading.html">Live Class Reloading</a>. Tapestry monitors the
file system for changes
to Java page classes, component classes, service implementation classes, HTML
templates and component property files, and it hot-swaps the changes into the
running application without requiring a restart <em>or losing session
data</em>. This provides a very short code-save-view cycle that no other
framework can touch.</p><h2 id="Principles-Scalability">Scalability</h2><p>When
building large scale systems it is important to consider how your resources are
going to be used on each deployed server, and how that information is going to
be shared between servers. Static structure means that page instances do not
need to be stored inside the HttpSession and simple browsing users do not
require extra system resources. This lean use of the HttpSession is key to
Tapestry's very high scalability, especially in a clustered configuration.
Again, linking an instance of a page to a particular client would require
vastly more server-side resources than having a single shared page
instance.</p><h1
id="Principles-Principle2–AdaptiveAPI">Principle 2 – Adaptive
API</h1><p>A key feature of Tapestry 5 is its adaptive API.</p><p>In
traditional Java frameworks (including Struts, <a
href="tapestry-for-jsf-users.html">JSF</a> and even the now-ancient Tapestry 4)
user code is expected to conform to the framework. You create classes that
extend from framework-provided base classes, or implement framework-provided
interfaces.</p><p>This works well until you upgrade to the next release of the
framework: with the new features of the upgrade, you will more often than not
experience breaks in backwards compatibility. Interfaces or base classes will
have changed and your existing code will need to be changed to match.</p><p>In
Tapestry 5, the framework adapts to your code. You have control over the names
of the methods, the parameters they take, and the value that is returned. This
is driven by annotations, which tell Tapestry under what circumstances your
methods are to be invok
ed.</p><p>For example, you may have a login form and have a method that gets
invoked when the form is submitted:</p><parameter
ac:name="lang">java</parameter><plain-text-body>public class Login
+ <div id="ConfluenceContent"><div class="aui-label"
style="float:right" title="Related Articles"><h3>Related Articles</h3><ul
class="content-by-label"><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="tapestry-for-jsf-users.html">Tapestry for JSF Users</a>
+ </div> </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="tapestry-tutorial.html">Tapestry Tutorial</a>
+ </div> </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="principles.html">Principles</a>
+ </div> </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="getting-started.html">Getting Started</a>
+ </div> </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small aui-iconfont-page-default"
title="Page">Page:</span>
+ </div>
+ <div class="details">
+ <a href="introduction.html">Introduction</a>
+ </div> </li></ul></div><h1
id="Principles-Principle1–StaticStructure,DynamicBehavior">Principle 1
– Static Structure, Dynamic Behavior</h1><p>The concept of "Dynamic
Behavior" should be pretty obvious when you are building a web application;
things should look different for different users/situations. But what does it
mean that Tapestry has "Static Structure?" Static structure implies that when
you build a page in Tapestry you are going to define all of the types of
components that are used within that page. Under no circumstance during the
rendering or event processing of the page will you be able to dynamically
create a new type of component and place that into the component tree.</p><p>At
first glance, this seems quite limiting ... other frameworks allow new elements
to be created on the fly; it's also a common feature of desktop GUIs such as
Swing. But static structure turns out to be not so limiting after all. You
<em>can</em> create new elements (you're actually
re-rendering existing components with different properties). And you have
plenty of options for getting dynamic behavior out of your static structure;
from the simple conditional and looping components to the more advanced
implementations of Tapestry's BeanEditor or Grid components, Tapestry gives you
control over what renders and when, and even where it appears on the page. And
starting in Tapestry 5.3 you can even use the <a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Dynamic.html">Dynamic
component</a>, which renders whatever is in an external template
file.</p><p>Why did Tapestry choose static structure as a core principle? It's
really a matter of meeting the requirements of agility and scalability.</p><h2
id="Principles-Agility">Agility</h2><p>Tapestry is designed to be an agile
working environment; "code less, deliver more". To support you writing less
code Tapestry does a lot of work on your POJO pages and co
mponents when first loading them. It also uses shared instances of page and
component classes (shared across multiple threads and requests). Having
dynamically modifiable structure would imply that each request has its own
instance and, further, that the entire structure would need to be serialized
between requests so that it can be restored to handle later
requests.</p><p>Tapestry also makes you more agile by speeding up the
development cycle with <a href="class-reloading.html">Live Class
Reloading</a>. Tapestry monitors the file system for changes to Java page
classes, component classes, service implementation classes, HTML templates and
component property files, and it hot-swaps the changes into the running
application without requiring a restart <em>or losing session data</em>. This
provides a very short code-save-view cycle that no other framework can
touch.</p><h2 id="Principles-Scalability">Scalability</h2><p>When building
large scale systems it is important to consider how
your resources are going to be used on each deployed server, and how that
information is going to be shared between servers. Static structure means that
page instances do not need to be stored inside the HttpSession and simple
browsing users do not require extra system resources. This lean use of the
HttpSession is key to Tapestry's very high scalability, especially in a
clustered configuration. Again, linking an instance of a page to a particular
client would require vastly more server-side resources than having a single
shared page instance.</p><h1
id="Principles-Principle2–AdaptiveAPI">Principle 2 – Adaptive
API</h1><p>A key feature of Tapestry 5 is its adaptive API.</p><p>In
traditional Java frameworks (including Struts, <a
href="tapestry-for-jsf-users.html">JSF</a> and even the now-ancient Tapestry 4)
user code is expected to conform to the framework. You create classes that
extend from framework-provided base classes, or implement framework-provided
interfaces.</p
><p>This works well until you upgrade to the next release of the framework:
>with the new features of the upgrade, you will more often than not experience
>breaks in backwards compatibility. Interfaces or base classes will have
>changed and your existing code will need to be changed to match.</p><p>In
>Tapestry 5, the framework adapts to your code. You have control over the
>names of the methods, the parameters they take, and the value that is
>returned. This is driven by annotations, which tell Tapestry under what
>circumstances your methods are to be invoked.</p><p>For example, you may have
>a login form and have a method that gets invoked when the form is
>submitted:</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 Login
{
@Persist
@Property
@@ -95,7 +121,8 @@
return PostLogin.class;
}
}
-</plain-text-body><p>This short snippet demonstrates a bit about how Tapestry
operates. Pages and services within the application are injected with the @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a>
annotation. The method names, <code>onValidateFromForm()</code> and
<code>onSuccessFromForm()</code>, inform Tapestry about when each method is to
be invoked. This naming convention identifies the event that is handled,
("validate" and "success") and the id of the component from which the event is
triggered (the "form" component).</p><p>The "validate" event is triggered to
perform cross-field validations, and the "success" event is only triggered when
there are no validation errors. The <code>onSuccessFromForm()</code> method's
return value directs Tapestry on what to do next: jump to another page within
the application (here identified as the class for the page, but many other
options exist). When
there are exceptions, the page will be redisplayed to the user.</p><p>By
contrast, in Tapestry 4 the Form component's listener parameter would be bound
to the method to invoke, by name. Further, the listener method had to be
public. The Tapestry 5 approach not only supports multiple listeners, but also
provides an improved separation of view concerns (inside the page's HTML
template) and logic concerns, inside the Java class.</p><p>In many cases,
additional information about the event is available and can be passed into the
method simply by adding parameters to the method. Again, Tapestry will adapt to
your parameters, in whatever order you supply them.</p><p>Tapestry also saves
you needless effort: the @<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Property.html">Property</a>
annotation marks a field as readable and writable; Tapestry will provide the
accessor methods automatically.</p><p>Finally, Tapestry 5 explicitly s
eparates actions (requests that change things) and rendering (requests that
render pages) into two separate requests. Performing an action, such as
clicking an action link or submitting a form, results in a client-side redirect
to the new page. This is the "<a class="external-link"
href="http://en.wikipedia.org/wiki/Post/Redirect/Get"
rel="nofollow">Post/Redirect/Get</a>" pattern (alternatively
"Post-Then-Redirect", or "Redirect After Post"). This helps ensure that URLs in
the browser are book-markable ... but also requires that a bit more information
be stored in the session between requests (using the @<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html">Persist</a>
annotation).</p><h1
id="Principles-Principle3–DifferentiatePublicvs.InternalAPIs">Principle 3
– Differentiate Public vs. Internal APIs</h1><p>An issue plaguing much
ancient versions of Tapestry (4 and earlier) was the lack of a clear deli
neation between private, internal APIs and public, external APIs. The fact
that your code would extend from base objects but that many of the methods on
those base objects were "off limits" further confused the issue. This has been
identified as a key factor in the "steep learning curve of Tapestry"
meme.</p><p>Designed from a clean slate, Tapestry 5 is much more ruthless about
what is internal vs. external.</p><p>First of all, anything inside the
org.apache.tapestry5.internal package is internal. It is part of the
implementation of Tapestry. It is the man behind the curtain. You should not
ever need to directly use this code. It is a bad idea to do so, because
internal code may change from one release to the next without concern for
backwards compatibility.</p><rich-text-body><p>If you ever find yourself forced
to make use of internal APIs, please bring it up on the developer mailing list;
this is how we know which services should be exposed as public, and fall under
the backwards
compatibility umbrella.</p></rich-text-body><h1
id="Principles-Principle4–EnsureBackwardsCompatibility">Principle 4
– Ensure Backwards Compatibility</h1><p>Older versions of Tapestry were
plagued by backwards compatibility problems with every major release. Tapestry
5 did not even attempt to be backwards compatible to Tapestry 4. Instead, it
laid the ground work for true backwards compatibility going
forwards.</p><p>Tapestry 5's API is based largely on naming conventions and
annotations. Your components are just ordinary Java classes; you annotate
fields to allow Tapestry to maintain their state or to allow Tapestry to inject
resources, and you name (or annotate) methods to tell Tapestry under what
circumstances a method should be invoked.</p><p>Tapestry will adapt to your
classes. It will call your methods, passing in values via method parameters.
Instead of the rigidness of a fixed interface to implement, Tapestry will
simply adapt to your classes, using the hints prov
ided by annotations and simple naming conventions.</p><p>Because of this,
Tapestry 5 can change internally to a great degree without it affecting any of
the application code you write. This has finally cracked the backwards
compatibility nut, allowing you to have great assurance that you can upgrade to
future releases of Tapestry without breaking your existing
applications.</p><p>This is already evident in Tapestry 5.1, 5.2 and 5.3 where
major new features and improvements have occurred, while remaining 100%
backwards compatible to Tapestry 5.0 – as long as you've avoided the
temptation to use internal APIs.</p><hr><p> </p></div>
+</pre>
+</div></div><p>This short snippet demonstrates a bit about how Tapestry
operates. Pages and services within the application are injected with the @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a>
annotation. The method names, <code>onValidateFromForm()</code> and
<code>onSuccessFromForm()</code>, inform Tapestry about when each method is to
be invoked. This naming convention identifies the event that is handled,
("validate" and "success") and the id of the component from which the event is
triggered (the "form" component).</p><p>The "validate" event is triggered to
perform cross-field validations, and the "success" event is only triggered when
there are no validation errors. The <code>onSuccessFromForm()</code> method's
return value directs Tapestry on what to do next: jump to another page within
the application (here identified as the class for the page, but many other
options exist). When there
are exceptions, the page will be redisplayed to the user.</p><p>By contrast,
in Tapestry 4 the Form component's listener parameter would be bound to the
method to invoke, by name. Further, the listener method had to be public. The
Tapestry 5 approach not only supports multiple listeners, but also provides an
improved separation of view concerns (inside the page's HTML template) and
logic concerns, inside the Java class.</p><p>In many cases, additional
information about the event is available and can be passed into the method
simply by adding parameters to the method. Again, Tapestry will adapt to your
parameters, in whatever order you supply them.</p><p>Tapestry also saves you
needless effort: the @<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Property.html">Property</a>
annotation marks a field as readable and writable; Tapestry will provide the
accessor methods automatically.</p><p>Finally, Tapestry 5 explicitly separat
es actions (requests that change things) and rendering (requests that render
pages) into two separate requests. Performing an action, such as clicking an
action link or submitting a form, results in a client-side redirect to the new
page. This is the "<a class="external-link"
href="http://en.wikipedia.org/wiki/Post/Redirect/Get"
rel="nofollow">Post/Redirect/Get</a>" pattern (alternatively
"Post-Then-Redirect", or "Redirect After Post"). This helps ensure that URLs in
the browser are book-markable ... but also requires that a bit more information
be stored in the session between requests (using the @<a class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Persist.html">Persist</a>
annotation).</p><h1
id="Principles-Principle3–DifferentiatePublicvs.InternalAPIs">Principle 3
– Differentiate Public vs. Internal APIs</h1><p>An issue plaguing much
ancient versions of Tapestry (4 and earlier) was the lack of a clear delineatio
n between private, internal APIs and public, external APIs. The fact that your
code would extend from base objects but that many of the methods on those base
objects were "off limits" further confused the issue. This has been identified
as a key factor in the "steep learning curve of Tapestry" meme.</p><p>Designed
from a clean slate, Tapestry 5 is much more ruthless about what is internal vs.
external.</p><p>First of all, anything inside the org.apache.tapestry5.internal
package is internal. It is part of the implementation of Tapestry. It is the
man behind the curtain. You should not ever need to directly use this code. It
is a bad idea to do so, because internal code may change from one release to
the next without concern for backwards compatibility.</p><div
class="confluence-information-macro confluence-information-macro-tip"><span
class="aui-icon aui-icon-small aui-iconfont-approve
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>If you
ever find yourself forced to make use of internal APIs, please bring it up on
the developer mailing list; this is how we know which services should be
exposed as public, and fall under the backwards compatibility
umbrella.</p></div></div><h1
id="Principles-Principle4–EnsureBackwardsCompatibility">Principle 4
– Ensure Backwards Compatibility</h1><p>Older versions of Tapestry were
plagued by backwards compatibility problems with every major release. Tapestry
5 did not even attempt to be backwards compatible to Tapestry 4. Instead, it
laid the ground work for true backwards compatibility going
forwards.</p><p>Tapestry 5's API is based largely on naming conventions and
annotations. Your components are just ordinary Java classes; you annotate
fields to allow Tapestry to maintain their state or to allow Tapestry to inject
resources, and you name (or annotate) methods to tell Tapestry under what
circumstances a method should be invoked.</p><p>Tapestry will adapt to your
classe
s. It will call your methods, passing in values via method parameters. Instead
of the rigidness of a fixed interface to implement, Tapestry will simply adapt
to your classes, using the hints provided by annotations and simple naming
conventions.</p><p>Because of this, Tapestry 5 can change internally to a great
degree without it affecting any of the application code you write. This has
finally cracked the backwards compatibility nut, allowing you to have great
assurance that you can upgrade to future releases of Tapestry without breaking
your existing applications.</p><p>This is already evident in Tapestry 5.1, 5.2
and 5.3 where major new features and improvements have occurred, while
remaining 100% backwards compatible to Tapestry 5.0 – as long as you've
avoided the temptation to use internal APIs.</p><hr><p> </p></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/property-expressions.html
==============================================================================
--- websites/production/tapestry/content/property-expressions.html (original)
+++ websites/production/tapestry/content/property-expressions.html Wed Sep 20
12:29:16 2017
@@ -67,7 +67,41 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><p>Tapestry uses <strong>property
expressions</strong> to move data between components. Property expressions are
the basis of the <a href="component-parameters.html">component parameters</a>
and <a href="component-templates.html">template expansions</a>.</p><parameter
ac:name="style">float:right</parameter><parameter ac:name="title">Related
Articles</parameter><parameter
ac:name="class">aui-label</parameter><rich-text-body><parameter
ac:name="showLabels">false</parameter><parameter
ac:name="showSpace">false</parameter><parameter ac:name="title">Related
Articles</parameter><parameter ac:name="cql">label = "expressions" and space =
currentSpace()</parameter></rich-text-body><p>A property expression is a string
that explains to Tapestry how to navigate from a root object (the containing
component) through some number of properties, to a final property that can be
read or updated. In fact, that's a simplification, as the properties may actua
lly be public fields, or even method invocations.</p><p>As elsewhere in
Tapestry, the names of fields, properties, and methods are recognized in a
case-insensitive manner.</p><p>The most basic form of a property expression is
a simple property name, such as "userName".</p><p>A series of property names
may be specified, separated by periods: "user.name", which is equivalent to
either <code>getUser().getName()</code> or <code>getUser().setName()</code>,
depending on context (whether the expression is being read or
updated).</p><p>The "." is called the "dereference operator". A second operator
is "?." or the "safe dereference operator". This works the same as "." except
that it allows any of the properties to be null. When reading, a null
short-circuits the expression (which returns null). When writing to a property,
an intermediate null value will cause the value to be discarded without
error.</p><p>In other words, "user?.name" works, even when the
<code>user</code> property may be nu
ll.</p><p>Property expressions can also reference public methods. Methods may
take parameters (or not), but must not return void. When the final term in a
property expression is a method, then the property expression is
read-only.</p><p>Being able to invoke methods was originally added so that it
was possible to access methods such as <code>java.util.Map.size()</code> (which
is not named like a property getter method). In Tapestry 5.1, property
expressions were extended so that parameters could be passed into
methods.</p><p>Parameters to methods are, themselves, property expressions.
This means that you can write a property expression that reads a property and
passes it as a parameter to a method, and then access a property of the object
returned from the method.</p><h2
id="PropertyExpressions-Compilation">Compilation</h2><p>Property expressions
are compiled to Java classes at runtime; there is no runtime reflection (unlike
the OGNL expression language used in prior releases of Tape
stry).</p><h2 id="PropertyExpressions-Grammar">Grammar</h2><p>Expressed in
simplified <a class="external-link"
href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form"
rel="nofollow">Backus–Naur Form</a>, the grammar of property expressions
is as follows:</p><plain-text-body>expression : keyword | rangeOp | constant |
propertyChain | list | notOp | map;
+ <div id="ConfluenceContent"><p>Tapestry uses <strong>property
expressions</strong> to move data between components. Property expressions are
the basis of the <a href="component-parameters.html">component parameters</a>
and <a href="component-templates.html">template expansions</a>.</p><div
class="aui-label" style="float:right" title="Related Articles">
+
+
+
+
+
+
+
+
+<h3>Related Articles</h3>
+
+<ul class="content-by-label"><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small
aui-iconfont-page-default" title="Page">Page:</span> </div>
+
+ <div class="details">
+ <a href="component-templates.html">Component
Templates</a>
+
+
+ </div>
+ </li><li>
+ <div>
+ <span class="icon aui-icon aui-icon-small
aui-iconfont-page-default" title="Page">Page:</span> </div>
+
+ <div class="details">
+ <a href="component-parameters.html">Component
Parameters</a>
+
+
+ </div>
+ </li></ul>
+</div>
+
+
+<p>A property expression is a string that explains to Tapestry how to navigate
from a root object (the containing component) through some number of
properties, to a final property that can be read or updated. In fact, that's a
simplification, as the properties may actually be public fields, or even method
invocations.</p><p>As elsewhere in Tapestry, the names of fields, properties,
and methods are recognized in a case-insensitive manner.</p><p>The most basic
form of a property expression is a simple property name, such as
"userName".</p><p>A series of property names may be specified, separated by
periods: "user.name", which is equivalent to either
<code>getUser().getName()</code> or <code>getUser().setName()</code>, depending
on context (whether the expression is being read or updated).</p><p>The "." is
called the "dereference operator". A second operator is "?." or the "safe
dereference operator". This works the same as "." except that it allows any of
the properties to be null. Wh
en reading, a null short-circuits the expression (which returns null). When
writing to a property, an intermediate null value will cause the value to be
discarded without error.</p><p>In other words, "user?.name" works, even when
the <code>user</code> property may be null.</p><p>Property expressions can also
reference public methods. Methods may take parameters (or not), but must not
return void. When the final term in a property expression is a method, then the
property expression is read-only.</p><p>Being able to invoke methods was
originally added so that it was possible to access methods such as
<code>java.util.Map.size()</code> (which is not named like a property getter
method). In Tapestry 5.1, property expressions were extended so that parameters
could be passed into methods.</p><p>Parameters to methods are, themselves,
property expressions. This means that you can write a property expression that
reads a property and passes it as a parameter to a method, and then access a pr
operty of the object returned from the method.</p><h2
id="PropertyExpressions-Compilation">Compilation</h2><p>Property expressions
are compiled to Java classes at runtime; there is no runtime reflection (unlike
the OGNL expression language used in prior releases of Tapestry).</p><h2
id="PropertyExpressions-Grammar">Grammar</h2><p>Expressed in simplified <a
class="external-link"
href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form"
rel="nofollow">Backus–Naur Form</a>, the grammar of property expressions
is as follows:</p><div class="preformatted panel" style="border-width:
1px;"><div class="preformattedContent panelContent">
+<pre>expression : keyword | rangeOp | constant | propertyChain | list | notOp
| map;
keyword : 'null' | 'this';
@@ -98,7 +132,8 @@ mapEntry : mapKey ':' expression;
mapKey : keyword | constant | propertyChain;
-</plain-text-body><p>
+</pre>
+</div></div><p>
</p><div class="confluence-information-macro
confluence-information-macro-information"><p class="title">Added in
5.3</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body">
</div></div>
Modified: websites/production/tapestry/content/registry-startup.html
==============================================================================
--- websites/production/tapestry/content/registry-startup.html (original)
+++ websites/production/tapestry/content/registry-startup.html Wed Sep 20
12:29:16 2017
@@ -27,6 +27,14 @@
</title>
<link type="text/css" rel="stylesheet" href="/resources/space.css" />
+ <link href='/resources/highlighter/styles/shCoreCXF.css'
rel='stylesheet' type='text/css' />
+ <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet'
type='text/css' />
+ <script src='/resources/highlighter/scripts/shCore.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushJava.js'
type='text/javascript'></script>
+ <script>
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
<link href="/styles/style.css" rel="stylesheet" type="text/css"/>
@@ -67,18 +75,21 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><p>It is possible to provide extra
logic to be executed at Registry startup, by making contributions to the
RegistryStartup service configuration.</p><p>The values contributed are
Runnable objects. The configuration is ordered, so it is possible to control in
what order the objects are executed.</p><p>RegistryStartup occurs after eager
loaded services are instantiated.</p><p>Here's an example of a module that
makes a contribution:</p><parameter
ac:name="">java</parameter><plain-text-body>public class MyModule
+ <div id="ConfluenceContent"><p>It is possible to provide extra
logic to be executed at Registry startup, by making contributions to the
RegistryStartup service configuration.</p><p>The values contributed are
Runnable objects. The configuration is ordered, so it is possible to control in
what order the objects are executed.</p><p>RegistryStartup occurs after eager
loaded services are instantiated.</p><p>Here's an example of a module that
makes a contribution:</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 MyModule
{
public static void
contributeRegistryStartup(OrderedConfiguration<Runnable> configuration)
{
configuration.add("MyContributionName", new Runnable() { ... });
}
-}</plain-text-body><p>Generally, these contributions are in the form of inner
classes; if they were services, they could just be eagerly loaded.</p><h2
id="RegistryStartup-StartupMethods">Startup Methods</h2><p>
+}</pre>
+</div></div><p>Generally, these contributions are in the form of inner
classes; if they were services, they could just be eagerly loaded.</p><h2
id="RegistryStartup-StartupMethods">Startup Methods</h2><p>
</p><div class="confluence-information-macro
confluence-information-macro-information"><p class="title">Added in
5.2</p><span class="aui-icon aui-icon-small aui-iconfont-info
confluence-information-macro-icon"></span><div
class="confluence-information-macro-body">
</div></div>
<div class="error"><span class="error">Unknown macro: {div}</span>
-<p> </p></div>Instead of making contributions to the RegistryStartup
service configuration you can provide startup methods inside your modules. A
startup method is a static or instance method of a module annotated with @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Startup.html">Startup</a>
annotation. Each module is allowed to contain several startup
methods.<parameter ac:name="">java</parameter><plain-text-body>public class
MyModule
+<p> </p></div>Instead of making contributions to the RegistryStartup
service configuration you can provide startup methods inside your modules. A
startup method is a static or instance method of a module annotated with @<a
class="external-link"
href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Startup.html">Startup</a>
annotation. Each module is allowed to contain several startup methods.<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 MyModule
{
@Startup
@@ -89,7 +100,8 @@
service.init();
}
}
-</plain-text-body><p> </p><p></p></div>
+</pre>
+</div></div><p> </p><p></p></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/release-notes-50.html
==============================================================================
--- websites/production/tapestry/content/release-notes-50.html (original)
+++ websites/production/tapestry/content/release-notes-50.html Wed Sep 20
12:29:16 2017
@@ -27,6 +27,16 @@
</title>
<link type="text/css" rel="stylesheet" href="/resources/space.css" />
+ <link href='/resources/highlighter/styles/shCoreCXF.css'
rel='stylesheet' type='text/css' />
+ <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet'
type='text/css' />
+ <script src='/resources/highlighter/scripts/shCore.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushJava.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushXml.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushPlain.js'
type='text/javascript'></script>
+ <script>
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
<link href="/styles/style.css" rel="stylesheet" type="text/css"/>
@@ -67,12 +77,19 @@
</div>
<div id="content">
- <div
id="ConfluenceContent"><plain-text-body>{scrollbar}</plain-text-body>
+ <div id="ConfluenceContent">
<p>This is the consolidated list of changes between Tapestry versions 5.0.3
and 5.0.19. Before upgrading, be sure to review the <a
href="how-to-upgrade.html">How to Upgrade</a> instructions.</p>
<p><strong>Contents</strong></p>
-<parameter ac:name="maxLevel">2</parameter><parameter
ac:name="minLevel">2</parameter><parameter ac:name="indent">5px</parameter>
+<style type="text/css">/*<![CDATA[*/
+div.rbtoc1499639566337 {padding: 0px;}
+div.rbtoc1499639566337 ul {list-style: disc;margin-left: 0px;padding-left:
5px;}
+div.rbtoc1499639566337 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style><div class="toc-macro rbtoc1499639566337">
+<ul class="toc-indentation"><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.19">Tapestry Version
5.0.19</a></li><li><a href="#ReleaseNotes5.0-TapestryVersion5.0.18">Tapestry
Version 5.0.18</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.17">Tapestry Version
5.0.17</a></li><li><a href="#ReleaseNotes5.0-TapestryVersion5.0.16">Tapestry
Version 5.0.16</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.15">Tapestry Version
5.0.15</a></li><li><a href="#ReleaseNotes5.0-TapestryVersion5.0.14">Tapestry
Version 5.0.14</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.13">Tapestry Version
5.0.13</a></li><li><a href="#ReleaseNotes5.0-TapestryVersion5.0.12">Tapestry
Version 5.0.12</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.11">Tapestry Version
5.0.11</a></li><li><a href="#ReleaseNotes5.0-TapestryVersion5.0.10">Tapestry
Version 5.0.10</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.9">Tapestry Version
5.0.9</a></li><li><a href="#ReleaseNot
es5.0-TapestryVersion5.0.8">Tapestry Version 5.0.8</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.7">Tapestry Version
5.0.7</a></li><li><a href="#ReleaseNotes5.0-TapestryVersion5.0.6">Tapestry
Version 5.0.6</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.5">Tapestry Version
5.0.5</a></li><li><a href="#ReleaseNotes5.0-TapestryVersion5.0.4">Tapestry
Version 5.0.4</a></li><li><a
href="#ReleaseNotes5.0-TapestryVersion5.0.3">Tapestry Version
5.0.3</a></li></ul>
+</div>
<h2 id="ReleaseNotes5.0-TapestryVersion5.0.19">Tapestry Version 5.0.19</h2>
@@ -414,8 +431,7 @@
<ul><li><a class="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1276">TAPESTRY-1276</a>
– If component should include an optional negate parameter</li><li><a
class="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1284">TAPESTRY-1284</a>
– Tapestry Spring integration module</li><li><a class="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1292">TAPESTRY-1292</a>
– Allow lists to be used as select models</li><li><a
class="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1302">TAPESTRY-1302</a>
– JavaScript support</li><li><a class="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1311">TAPESTRY-1311</a>
– Identify type of component via tag element name in templates</li><li><a
class="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1319">TAPESTRY-1319</a>
– tapestry.InfrastructureOverrides is not yet implemented</li><li><a cla
ss="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1325">TAPESTRY-1325</a>
– Add an "asset:" object provider, to simplfy injecting assets into
services</li><li><a class="external-link"
href="https://issues.apache.org/jira/browse/TAPESTRY-1341">TAPESTRY-1341</a>
– Allow service builders named "build" and determine service id from the
result type</li></ul>
-
-<plain-text-body>{scrollbar}</plain-text-body></div>
+</div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/release-notes-51.html
==============================================================================
--- websites/production/tapestry/content/release-notes-51.html (original)
+++ websites/production/tapestry/content/release-notes-51.html Wed Sep 20
12:29:16 2017
@@ -27,6 +27,16 @@
</title>
<link type="text/css" rel="stylesheet" href="/resources/space.css" />
+ <link href='/resources/highlighter/styles/shCoreCXF.css'
rel='stylesheet' type='text/css' />
+ <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet'
type='text/css' />
+ <script src='/resources/highlighter/scripts/shCore.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushJava.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushXml.js'
type='text/javascript'></script>
+ <script src='/resources/highlighter/scripts/shBrushPlain.js'
type='text/javascript'></script>
+ <script>
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+ </script>
<link href="/styles/style.css" rel="stylesheet" type="text/css"/>
@@ -67,12 +77,19 @@
</div>
<div id="content">
- <div
id="ConfluenceContent"><plain-text-body>{scrollbar}</plain-text-body>
+ <div id="ConfluenceContent">
<p>This is the consolidated list of changes between Tapestry versions 5.0 and
5.1. Before upgrading, be sure to review the <a href="how-to-upgrade.html">How
to Upgrade</a> instructions.</p>
<p><strong>Contents</strong></p>
-<parameter ac:name="maxLevel">2</parameter><parameter
ac:name="minLevel">2</parameter>
+<style type="text/css">/*<![CDATA[*/
+div.rbtoc1499639565943 {padding: 0px;}
+div.rbtoc1499639565943 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499639565943 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style><div class="toc-macro rbtoc1499639565943">
+<ul class="toc-indentation"><li><a
href="#ReleaseNotes5.1-TapestryVersion5.1.0.5">Tapestry Version
5.1.0.5</a></li><li><a href="#ReleaseNotes5.1-TapestryVersion5.1.0.4">Tapestry
Version 5.1.0.4</a></li><li><a
href="#ReleaseNotes5.1-TapestryVersion5.1.0.3">Tapestry Version
5.1.0.3</a></li><li><a href="#ReleaseNotes5.1-TapestryVersion5.1.0.2">Tapestry
Version 5.1.0.2</a></li><li><a
href="#ReleaseNotes5.1-TapestryVersion5.1.0.1">Tapestry Version
5.1.0.1</a></li><li><a href="#ReleaseNotes5.1-TapestryVersion5.1.0.0">Tapestry
Version 5.1.0.0</a></li></ul>
+</div>
<h2 id="ReleaseNotes5.1-TapestryVersion5.1.0.5">Tapestry Version 5.1.0.5</h2>
@@ -200,8 +217,7 @@
<ul><li><a class="external-link"
href="https://issues.apache.org/jira/browse/TAP5-372">TAP5-372</a> –
Merge changes from 5.0.16 --> 5.0.17 into trunk (5.1)</li><li><a
class="external-link"
href="https://issues.apache.org/jira/browse/TAP5-379">TAP5-379</a> – Add
the Ars Machina Project to the list of Tapestry 5-related packages</li><li><a
class="external-link"
href="https://issues.apache.org/jira/browse/TAP5-381">TAP5-381</a> –
Documentation talks about a "tapestry.charset" when there's no such
configuration documented</li><li><a class="external-link"
href="https://issues.apache.org/jira/browse/TAP5-480">TAP5-480</a> –
Upgrade Surefire Plugin and TestNG dependencies to latest version (2.4.3 and
5.8, respectively)</li><li><a class="external-link"
href="https://issues.apache.org/jira/browse/TAP5-493">TAP5-493</a> –
Translate StructureStrings#original-child-component</li><li><a
class="external-link" href="https://issues.apache.org/jira/browse/TAP5-
494">TAP5-494</a> – Downgrade maven-site-plugin from 2.0-beta-6 to
2.0-beta-5 because we prefer a site that actually works</li></ul>
-
-<plain-text-body>{scrollbar}</plain-text-body></div>
+</div>
</div>
<div class="clearer"></div>