Author: bobharner
Date: Wed Mar  2 01:52:17 2016
New Revision: 981605

Log:
Fixed TAP5-1707 (The RenderNotification Mixin should documented with an example)

Modified:
    
websites/production/tapestry/content/5.4/apidocs/org/apache/tapestry5/corelib/mixins/RenderNotification.html

Modified: 
websites/production/tapestry/content/5.4/apidocs/org/apache/tapestry5/corelib/mixins/RenderNotification.html
==============================================================================
--- 
websites/production/tapestry/content/5.4/apidocs/org/apache/tapestry5/corelib/mixins/RenderNotification.html
 (original)
+++ 
websites/production/tapestry/content/5.4/apidocs/org/apache/tapestry5/corelib/mixins/RenderNotification.html
 Wed Mar  2 01:52:17 2016
@@ -2,15 +2,15 @@
 <!-- NewPage -->
 <html lang="en">
 <head>
-<!-- Generated by javadoc (version 1.7.0_75) on Tue Mar 01 20:10:47 EST 2016 
-->
-<title>RenderNotification (Tapestry API - 5.4.0)</title>
+<!-- Generated by javadoc (version 1.7.0_75) on Tue Mar 01 20:48:24 EST 2016 
-->
+<title>RenderNotification (Tapestry API - 5.4.1)</title>
 <meta name="date" content="2016-03-01">
 <link rel="stylesheet" type="text/css" href="../../../../../stylesheet7.css" 
title="Style">
 </head>
 <body>
 <script type="text/javascript"><!--
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="RenderNotification (Tapestry API - 5.4.0)";
+        parent.document.title="RenderNotification (Tapestry API - 5.4.1)";
     }
 //-->
 </script>
@@ -33,7 +33,7 @@
 <li><a href="../../../../../index-files/index-1.html">Index</a></li>
 <li><a href="../../../../../help-doc.html">Help</a></li>
 </ul>
-<div class="aboutLanguage"><em>Tapestry API - 5.4.0</em></div>
+<div class="aboutLanguage"><em>Tapestry API - 5.4.1</em></div>
 </div>
 <div class="subNav">
 <ul class="navList">
@@ -99,14 +99,45 @@
 <br>
 <pre><a href="../../../../../org/apache/tapestry5/annotations/Events.html" 
title="annotation in org.apache.tapestry5.annotations">@Events</a>(<a 
href="../../../../../org/apache/tapestry5/annotations/Events.html#value()">value</a>={"beginRender","afterRender"})
 <a href="../../../../../org/apache/tapestry5/annotations/MixinAfter.html" 
title="annotation in org.apache.tapestry5.annotations">@MixinAfter</a>
-public class <a 
href="../../../../../src-html/org/apache/tapestry5/corelib/mixins/RenderNotification.html#line.40">RenderNotification</a>
+public class <a 
href="../../../../../src-html/org/apache/tapestry5/corelib/mixins/RenderNotification.html#line.71">RenderNotification</a>
 extends <a 
href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true";
 title="class or interface in java.lang">Object</a></pre>
-<div class="block">This mixin triggers event notifcations to identify when it 
enters
- the <a 
href="../../../../../org/apache/tapestry5/annotations/BeginRender.html" 
title="annotation in 
org.apache.tapestry5.annotations"><code>BeginRender</code></a> and <a 
href="../../../../../org/apache/tapestry5/annotations/AfterRender.html" 
title="annotation in 
org.apache.tapestry5.annotations"><code>AfterRender</code></a> render phases.
- The <a href="../../../../../org/apache/tapestry5/MarkupWriter.html" 
title="interface in org.apache.tapestry5"><code>MarkupWriter</code></a> is 
passed as the event context. The most common use of this
- is to handle the "afterRender" event to generate client-side JavaScript for 
content
- just rendered via a <a href="../../../../../org/apache/tapestry5/Block.html" 
title="interface in org.apache.tapestry5"><code>Block</code></a> (this is a 
common Ajax use case related to partial
- page rendering).</div>
+<div class="block">This mixin triggers <em>component event</em> notifications 
when the
+ attached component enters its <a 
href="../../../../../org/apache/tapestry5/annotations/BeginRender.html" 
title="annotation in 
org.apache.tapestry5.annotations"><code>BeginRender</code></a> and <a 
href="../../../../../org/apache/tapestry5/annotations/AfterRender.html" 
title="annotation in 
org.apache.tapestry5.annotations"><code>AfterRender</code></a>
+ render phases. A common use of this is to handle the "afterRender"
+ event to generate client-side JavaScript for content just rendered via a
+ <a href="../../../../../org/apache/tapestry5/Block.html" title="interface in 
org.apache.tapestry5"><code>Block</code></a> (this is a common Ajax use case 
related to partial page
+ rendering). Since AJAX requests don't trigger afterRender or beforeRender
+ render phase events in the containing component or page, this mixin provides
+ a way of accessing those events as component events.
+ <p>
+ An example using the <a 
href="../../../../../org/apache/tapestry5/corelib/components/Any.html" 
title="class in org.apache.tapestry5.corelib.components"><code>Any</code></a>
+ component within a zone:
+ <pre>
+ &lt;div t:type="Zone" id="myZone"&gt;
+     &lt;t:any t:mixins="RenderNotification"&gt;
+              &lt;!-- zone content -&gt;
+      &lt;/div&gt;
+ &lt;/div&gt;
+ </pre>
+ The <a href="../../../../../org/apache/tapestry5/MarkupWriter.html" 
title="interface in org.apache.tapestry5"><code>MarkupWriter</code></a> is 
passed as the event context to your event handler
+ method(s), so your corresponding component or page class might look like:
+ <pre>
+ void onBeginRenderFromMyZone(MarkupWriter writer)
+ {
+     writer.element("p");
+     writer.write("before item render");
+     writer.end();
+ }
+
+ void onAfterRenderFromMyZone(MarkupWriter writer)
+ {
+     writer.element("p");
+     writer.write("after item render");
+     writer.end();
+ }
+ </pre>
+ As an alternative, see the <a 
href="../../../../../org/apache/tapestry5/corelib/components/Trigger.html" 
title="class in 
org.apache.tapestry5.corelib.components"><code>Trigger</code></a>
+ component, which does something similar but as a component rather than a 
mixin.</div>
 <dl><dt><span class="strong">Since:</span></dt>
   <dd>5.2.0</dd>
 <p><table class='parameters'><caption><span>Component Events</span><span 
class='tabEnd'>&nbsp;</span></caption><tr class='columnHeaders'><th 
class='colFirst'>Name</th><th class='colLast'>Description</th></tr><tbody><tr 
class='altColor'><td class='colFirst'>afterRender</td><td 
class='colLast'>&nbsp;</td></tr><tr class='rowColor'><td 
class='colFirst'>beginRender</td><td 
class='colLast'>&nbsp;</td></tr></table></p></dl>
@@ -166,7 +197,7 @@ extends <a href="http://download.oracle.
 <ul class="blockListLast">
 <li class="blockList">
 <h4>RenderNotification</h4>
-<pre>public&nbsp;<a 
href="../../../../../src-html/org/apache/tapestry5/corelib/mixins/RenderNotification.html#line.40">RenderNotification</a>()</pre>
+<pre>public&nbsp;<a 
href="../../../../../src-html/org/apache/tapestry5/corelib/mixins/RenderNotification.html#line.71">RenderNotification</a>()</pre>
 </li>
 </ul>
 </li>
@@ -192,7 +223,7 @@ extends <a href="http://download.oracle.
 <li><a href="../../../../../index-files/index-1.html">Index</a></li>
 <li><a href="../../../../../help-doc.html">Help</a></li>
 </ul>
-<div class="aboutLanguage"><em>Tapestry API - 5.4.0</em></div>
+<div class="aboutLanguage"><em>Tapestry API - 5.4.1</em></div>
 </div>
 <div class="subNav">
 <ul class="navList">


Reply via email to