Author: buildbot
Date: Sun Jan 23 23:11:51 2022
New Revision: 1078164
Log:
Production update by buildbot for tapestry
Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/page-navigation.html
websites/production/tapestry/content/rest-support-580.html
Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/tapestry/content/page-navigation.html
==============================================================================
--- websites/production/tapestry/content/page-navigation.html (original)
+++ websites/production/tapestry/content/page-navigation.html Sun Jan 23
23:11:51 2022
@@ -196,6 +196,15 @@
<span class="icon aui-icon content-type-page"
title="Page">Page:</span> </div>
<div class="details">
+ <a href="rest-support-580.html">REST Support
(5.8.0+)</a>
+
+
+ </div>
+ </li><li>
+ <div>
+ <span class="icon aui-icon content-type-page"
title="Page">Page:</span> </div>
+
+ <div class="details">
<a href="page-navigation.html">Page Navigation</a>
@@ -223,11 +232,11 @@
<p>In essence, a Tapestry application is a number of related pages, working
together. To some degree, each page is like an application unto
itself.</p><p>Any individual request will be targeted at a single page.
Requests come in two forms: </p><ul><li><em>component event</em> requests
target a specific component on a specific page, triggering an event within that
component</li><li><em>render</em> requests target a specific page, and stream
the HTML markup for that page back to the client</li></ul><p>This dichotomy
between component event requests and render requests alleviates a number of
problems in traditional web applications related to the browser back button, or
to the user hitting the refresh button in their browser.</p><h3
id="PageNavigation-Contents">Contents</h3><h2
id="PageNavigation-Contents|RelatedArticlesLogicalPageNameShortening"><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1608762022613 {padding: 0px;}
-div.rbtoc1608762022613 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1608762022613 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1642979504601 {padding: 0px;}
+div.rbtoc1642979504601 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1642979504601 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></h2><div class="toc-macro rbtoc1608762022613">
+/*]]>*/</style></h2><div class="toc-macro rbtoc1642979504601">
<ul class="toc-indentation"><li><a
href="#PageNavigation-Contents|RelatedArticlesLogicalPageNameShortening">Logical
Page Name Shortening</a></li><li><a
href="#PageNavigation-ComponentEventRequests&Responses">Component Event
Requests & Responses</a>
<ul class="toc-indentation"><li><a href="#PageNavigation-1.Nullresponse">1.
Null response</a></li><li><a href="#PageNavigation-2.Stringresponse">2. String
response</a></li><li><a href="#PageNavigation-3.Classresponse">3. Class
response</a></li><li><a href="#PageNavigation-4.Pageresponse">4. Page
response</a></li><li><a href="#PageNavigation-5.HttpError">5.
HttpError</a></li><li><a href="#PageNavigation-6.Linkresponse">6. Link
response</a></li><li><a href="#PageNavigation-7.Streamresponse">7. Stream
response</a></li><li><a href="#PageNavigation-8.URLresponse">8. URL
response</a></li><li><a href="#PageNavigation-9.Objectresponse">9. Object
response</a></li></ul>
</li><li><a href="#PageNavigation-PageRenderRequests">Page Render
Requests</a></li><li><a href="#PageNavigation-PageActivation">Page
Activation</a></li><li><a href="#PageNavigation-PageNavigationPatterns">Page
Navigation Patterns</a>
@@ -273,7 +282,7 @@ public Object onAction(){
}
};
}</code></pre>
-</div></div><h3 id="PageNavigation-8.URLresponse">8. URL response</h3><p>A
java.net.URL response is handled as a client redirect to an external URL. (In
Tapestry 5.3.x and earlier this only works for non-Ajax requests.)</p><h3
id="PageNavigation-9.Objectresponse">9. Object response</h3><p>Any other type
of object returned from an event handler method is an error.</p><h2
id="PageNavigation-PageRenderRequests">Page Render Requests</h2><p>Render
requests are simpler in structure and behavior than component event requests.
In the simplest case, the URL is simply the logical name of the
page.</p><p>Pages may have an <em>activation context</em>. The activation
context represents persistent information about the state of the page. In
practical terms, the activation context is usually the id of some
database-persistent object.</p><p>When a page has an activation context, the
values of the context are appended to the URL path. For example,
in <code><span class="nolink">http://www.exampl
e.com/myapp/foo/bar</span></code> the "myapp" part is the servlet context
(usually the name of your app), and the "foo/bar" part is the activation
context, with "foo" being the first activation parameter and "bar" being the
second.</p><p>It is common for most pages to not have any activation
context.</p><p>The activation context may be explicitly set when the render
request link is created (the PageLink component has a context parameter for
this purpose).</p><p>When no explicit activation context is provided, the page
itself is queried for its activation context. This querying takes the form of
an event trigger. The event name is "passivate" (as we'll see shortly, there's
a corresponding "activate"). The return value of the method is used as the
context. For example:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+</div></div><p></p><h3 id="PageNavigation-8.URLresponse">8. URL
response</h3><p>A java.net.URL response is handled as a client redirect to an
external URL. (In Tapestry 5.3.x and earlier this only works for non-Ajax
requests.)</p><h3 id="PageNavigation-9.Objectresponse">9. Object
response</h3><p>Any other type of object returned from an event handler method
is an error.</p><h2 id="PageNavigation-PageRenderRequests">Page Render
Requests</h2><p>Render requests are simpler in structure and behavior than
component event requests. In the simplest case, the URL is simply the logical
name of the page.</p><p>Pages may have an <em>activation context</em>. The
activation context represents persistent information about the state of the
page. In practical terms, the activation context is usually the id of some
database-persistent object.</p><p>When a page has an activation context, the
values of the context are appended to the URL path. For example,
in <code><span class="nolink">http://www
.example.com/myapp/foo/bar</span></code> the "myapp" part is the servlet
context (usually the name of your app), and the "foo/bar" part is the
activation context, with "foo" being the first activation parameter and "bar"
being the second.</p><p>It is common for most pages to not have any activation
context.</p><p>The activation context may be explicitly set when the render
request link is created (the PageLink component has a context parameter for
this purpose).</p><p>When no explicit activation context is provided, the page
itself is queried for its activation context. This querying takes the form of
an event trigger. The event name is "passivate" (as we'll see shortly, there's
a corresponding "activate"). The return value of the method is used as the
context. For example:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
<pre><code class="language-java">public class ProductDetail
{
private Product product;
@@ -284,7 +293,7 @@ public Object onAction(){
</div></div><p>The activation context may consist of a series of values, in
which case the return value of the method should be an array or a List.</p><div
class="confluence-information-macro
confluence-information-macro-information"><span class="aui-icon aui-icon-small
aui-iconfont-info confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>Note: If you are using the <a
href="hibernate-user-guide.html">tapestry-hibernate</a> integration library and
your passivate context is a Hibernate entity, then you can just use the entity
itself, not its id. Tapestry will automatically extract the entity's id into
the URL, and convert it back for the "activate" event handler
method.</p></div></div><h2 id="PageNavigation-PageActivation">Page
Activation</h2><p>When a page render request arrives, the page is
<em>activated</em> before it is rendered.</p><div class="navmenu"
style="float:right; background:#eee; margin:3px; padding:0 1em">
<p> <strong>JumpStart Demos:</strong>
<span class="nobr"><a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/onactivateandonpassivate/3"
rel="nofollow">onActivate and onPassivate<sup><img align="middle"
class="rendericon" src="/images/confluence/icons/linkext7.gif" height="7"
width="7" alt="" border="0"></sup></a></span>
- <span class="nobr"><a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/infrastructure/handlingabadcontext/1"
rel="nofollow">Handling A Bad Context<sup><img align="middle"
class="rendericon" src="/images/confluence/icons/linkext7.gif" height="7"
width="7" alt="" border="0"></sup></a></span></p></div>Activation serves two
purposes:<ul><li>It allows the page to restore its internal state from data
encoded into the URL (the activation context discussed above).</li><li>It
provides coarse approach to validating access to the page.</li></ul><p>The
later case – validation – is generally concerned with user
identity and access; if you have pages that may only be accessed by certain
users, you may use the page's activate event handler for verifying that
access.</p><p>Page activation uses Tapestry's <em>Component Event</em>
mechanism. See <a href="component-events.html">Component Events</a> for
details.</p><p>A page's activate even
t handler mirrors its passivate handler:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+ <span class="nobr"><a class="external-link"
href="http://jumpstart.doublenegative.com.au/jumpstart/examples/infrastructure/handlingabadcontext/1"
rel="nofollow">Handling A Bad Context<sup><img align="middle"
class="rendericon" src="/images/confluence/icons/linkext7.gif" height="7"
width="7" alt="" border="0"></sup></a></span></p></div>Activation serves two
purposes:<p></p><ul><li>It allows the page to restore its internal state from
data encoded into the URL (the activation context discussed above).</li><li>It
provides coarse approach to validating access to the page.</li></ul><p>The
later case – validation – is generally concerned with user
identity and access; if you have pages that may only be accessed by certain
users, you may use the page's activate event handler for verifying that
access.</p><p>Page activation uses Tapestry's <em>Component Event</em>
mechanism. See <a href="component-events.html">Component Events</a> for
details.</p><p>A page's activa
te event handler mirrors its passivate handler:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre><code class="language-java"> private Product product;
. . .
void onActivate(long productId)
Modified: websites/production/tapestry/content/rest-support-580.html
==============================================================================
--- websites/production/tapestry/content/rest-support-580.html (original)
+++ websites/production/tapestry/content/rest-support-580.html Sun Jan 23
23:11:51 2022
@@ -142,12 +142,12 @@
<!-- /// Content Start -->
<div id="content">
- <div id="ConfluenceContent"><h2
id="RESTSupport(5.8.0+)-/*<![CDATA[*/div.rbtoc1642965103666{padding:0px;}div.rbtoc1642965103666ul{list-style:disc;margin-left:0px;}div.rbtoc1642965103666li{margin-left:0px;padding-left:0px;}/*]]>*/#RESTSupport(5.8.0+)-Overview#RESTSupport(5.8.0+)-OverviewWrit"><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1642965103666 {padding: 0px;}
-div.rbtoc1642965103666 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1642965103666 li {margin-left: 0px;padding-left: 0px;}
+ <div id="ConfluenceContent"><h2
id="RESTSupport(5.8.0+)-/*<![CDATA[*/div.rbtoc1642979507620{padding:0px;}div.rbtoc1642979507620ul{list-style:disc;margin-left:0px;}div.rbtoc1642979507620li{margin-left:0px;padding-left:0px;}/*]]>*/#RESTSupport(5.8.0+)-Overview#RESTSupport(5.8.0+)-OverviewWrit"><style
type="text/css">/*<![CDATA[*/
+div.rbtoc1642979507620 {padding: 0px;}
+div.rbtoc1642979507620 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1642979507620 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></h2><div class="toc-macro rbtoc1642965103666">
+/*]]>*/</style></h2><div class="toc-macro rbtoc1642979507620">
<ul class="toc-indentation"><li><a
href="#RESTSupport(5.8.0+)-"></a></li><li><a
href="#RESTSupport(5.8.0+)-Overview">Overview</a></li><li><a
href="#RESTSupport(5.8.0+)-WritingRESTendpoints">Writing REST
endpoints</a></li><li><a
href="#RESTSupport(5.8.0+)-Readingtherequestbodywith@RequestBody">Reading the
request body with @RequestBody</a></li><li><a
href="#RESTSupport(5.8.0+)-AnsweringRESTrequests">Answering REST requests</a>
<ul class="toc-indentation"><li><a
href="#RESTSupport(5.8.0+)-Contentresponses">Content responses</a></li><li><a
href="#RESTSupport(5.8.0+)-Non-contentresponses">Non-content
responses</a></li></ul>
</li><li><a
href="#RESTSupport(5.8.0+)-MappedEntityManagerservice">MappedEntityManager
service</a></li><li><a
href="#RESTSupport(5.8.0+)-IntegrationwithJacksonDatabindwithtapestry-rest-jackson">Integration
with Jackson Databind with tapestry-rest-jackson</a></li><li><a
href="#RESTSupport(5.8.0+)-AutomaticgenerationofOpenAPI3.0(Swagger)descriptions">Automatic
generation of OpenAPI 3.0 (Swagger) descriptions</a>