Author: buildbot Date: Mon Dec 23 06:11:51 2024 New Revision: 1088331 Log: Production update by buildbot for tapestry
Modified: websites/production/tapestry/content/cache/main.pageCache websites/production/tapestry/content/page-navigation.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 Mon Dec 23 06:11:51 2024 @@ -233,11 +233,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.rbtoc1734012714404 {padding: 0px;} -div.rbtoc1734012714404 ul {margin-left: 0px;} -div.rbtoc1734012714404 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1734934305191 {padding: 0px;} +div.rbtoc1734934305191 ul {margin-left: 0px;} +div.rbtoc1734934305191 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></h2><div class="toc-macro rbtoc1734012714404"> +/*]]>*/</style></h2><div class="toc-macro rbtoc1734934305191"> <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> @@ -294,7 +294,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="https://tapestry-jumpstart.org/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="https://tapestry-jumpstart.org/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><p>Activation serves two purposes:</p><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 activat e event 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="https://tapestry-jumpstart.org/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 activate 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) @@ -324,7 +324,7 @@ public Object onAction(){ . . . </code></pre> -</div></div><h2 id="PageNavigation-PageNavigationPatterns">Page Navigation Patterns</h2><p>This combination of action links and context and page context can be put together in any number of ways.</p><p>Let's take a typical master/detail relationship using the concept of a product catalog page. In this example, the ProductListing page is a list of products, and the ProductDetails page must display the details for a specific product.</p><h3 id="PageNavigation-Pattern1:Componenteventrequests/PersistentData">Pattern 1: Component event requests / Persistent Data</h3><p>In this pattern, the ProductListing page uses action events and a persistent field on the ProductDetails page.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>ProductListing.html</b></div><div class="codeContent panelContent pdl"> +</div></div><h2 id="PageNavigation-PageNavigationPatterns">Page Navigation Patterns</h2><p>This combination of action links and context and page context can be put together in any number of ways.</p><p>Let's take a typical master/detail relationship using the concept of a product catalog page. In this example, the ProductListing page is a list of products, and the ProductDetails page must display the details for a specific product.</p><h3 id="PageNavigation-Pattern1:Componenteventrequests/PersistentData">Pattern 1: Component event requests / Persistent Data</h3><p>In this pattern, the ProductListing page uses action events and a persistent field on the ProductDetails page.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>ProductListing.tml</b></div><div class="codeContent panelContent pdl"> <pre><code class="language-java"> <t:loop source="products" value="product"> <a t:type="actionlink" t:id="select" context="product.id">${product.name}</a> </t:loop>