You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/02/19 19:54:19 UTC

svn commit: r911930 - in /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5: RenderSupport.java services/javascript/JavascriptSupport.java

Author: hlship
Date: Fri Feb 19 18:54:18 2010
New Revision: 911930

URL: http://svn.apache.org/viewvc?rev=911930&view=rev
Log:
Improve JavaDoc description of RenderSupport and JavascriptSupport

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/RenderSupport.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavascriptSupport.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/RenderSupport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/RenderSupport.java?rev=911930&r1=911929&r2=911930&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/RenderSupport.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/RenderSupport.java Fri Feb 19 18:54:18 2010
@@ -30,7 +30,7 @@
  * When rendering, a <script> block will be added to the bottom of the page (just before the </body> tag).
  * The scripting statements added to this block will be executed, on the client, only once the page has fully loaded.
  * <p>
- * The methods in this interface are largely being replaced with a new interface, {@link JavascriptSupport}.
+ * The methods in this interface are largely being replaced with a new environmental interface, {@link JavascriptSupport}.
  * <p>
  * RenderSupport is normally accessed within a component by using the {@link Environmental} annotation on a component
  * field. In addition, RenderSupport may also be accessed as a service (the service

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavascriptSupport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavascriptSupport.java?rev=911930&r1=911929&r2=911930&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavascriptSupport.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavascriptSupport.java Fri Feb 19 18:54:18 2010
@@ -16,9 +16,25 @@
 
 import org.apache.tapestry5.Asset;
 import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.RenderSupport;
+import org.apache.tapestry5.annotations.Environmental;
 import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary;
 import org.apache.tapestry5.json.JSONObject;
+import org.apache.tapestry5.services.EnvironmentalShadowBuilder;
 
+/**
+ * An environmental that acts as a replacement for the {@link RenderSupport} environmental, renaming and streamlining
+ * the the key methods. JavascriptSupport is very stateful, accumulating JavaScript libraries and initialization code
+ * until the end of the main page render; it then updates the rendered DOM (adding &lt;script&gt; tags to the
+ * &lt;head&gt; and &lt;body&gt;) before the document is streamed to the client.
+ * <p>
+ * JavascriptSupport is normally accessed within a component by using the {@link Environmental} annotation on a
+ * component field. In addition, JavascriptSupport may also be accessed as a service (the service
+ * {@linkplain EnvironmentalShadowBuilder internally delegates to the current environmental instance}), which is useful
+ * for service-layer objects.
+ * 
+ * @since 5.2.0
+ */
 public interface JavascriptSupport
 {
     /**
@@ -114,7 +130,7 @@
      *            string to pass to function (typically, a client id)
      */
     void addInitializerCall(InitializationPriority priority, String functionName, String parameter);
-    
+
     /**
      * Imports a JavaScript library as part of the rendered page. Libraries are added in the order
      * they are first imported; duplicate imports are ignored.