click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1029575 - in /click/trunk/click: documentation/xdocs/src/docbook/click/ framework/src/org/apache/click/ framework/src/org/apache/click/ajax/ mock/src/org/apache/click/ mock/test/org/apache/click/
Date Mon, 01 Nov 2010 08:25:30 GMT
Author: sabob
Date: Mon Nov  1 08:25:29 2010
New Revision: 1029575

URL: http://svn.apache.org/viewvc?rev=1029575&view=rev
Log:
renamed preGetHeadElements to preRenderHeadElements

Modified:
    click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml
    click/trunk/click/framework/src/org/apache/click/Behavior.java
    click/trunk/click/framework/src/org/apache/click/ClickServlet.java
    click/trunk/click/framework/src/org/apache/click/ControlRegistry.java
    click/trunk/click/framework/src/org/apache/click/ajax/DefaultAjaxBehavior.java
    click/trunk/click/mock/src/org/apache/click/MockContext.java
    click/trunk/click/mock/test/org/apache/click/MockContextTest.java

Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml
URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml?rev=1029575&r1=1029574&r2=1029575&view=diff
==============================================================================
--- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml (original)
+++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-controls.xml Mon Nov 
1 08:25:29 2010
@@ -1174,7 +1174,7 @@ method, and the same Behavior can be sha
       </listitem>
       <listitem>
         <para>
-          <ulink url="../../click-api/org/apache/click/Behavior.html#preGetHeadElements(org.apache.click.Control)">preGetHeadElements(Control)</ulink>
+          <ulink url="../../click-api/org/apache/click/Behavior.html#preRenderHeadElements(org.apache.click.Control)">preRenderHeadElements(Control)</ulink>
           - defines an interceptor method that is invoked after <methodname>preResponse()</methodname>
           but before the <classname>Control</classname> <methodname>getHeadElements()</methodname>
           is called. This is a good place to add custom JavaScript or CSS elements
@@ -1231,7 +1231,7 @@ necessary JavaScript to a target Field:
 <programlisting language="java">
     public class FocusBehavior implements Behavior {
 
-        public void preGetHeadElements(Control control) {
+        public void preRenderHeadElements(Control control) {
             String id = control.getId();
             JsScript jsScript = new JsScript("document.getElementById('" + id + "').focus();");
 
@@ -1275,11 +1275,11 @@ necessary JavaScript to a target Field:
 
     <para>Before the Control's HEAD elements are rendered, Click will invoke the
     <classname>FocusBehavior</classname> <emphasis>interceptor method</emphasis>,
-    <ulink url="../../click-api/org/apache/click/Behavior.html#preGetHeadElements(org.apache.click.Control)">preGetHeadElements(Control)</ulink>,
+    <ulink url="../../click-api/org/apache/click/Behavior.html#preRenderHeadElements(org.apache.click.Control)">preRenderHeadElements(Control)</ulink>,
     passing the <emphasis>nameField</emphasis> as an argument.
     </para>
 
-    <para>The FocusBehavior <methodname>preGetHeadElements</methodname>
method
+    <para>The FocusBehavior <methodname>preRenderHeadElements</methodname>
method
     will add the JavaScript code to the Field HEAD elements which will be rendered
     as part of the server response.
     </para>

Modified: click/trunk/click/framework/src/org/apache/click/Behavior.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/Behavior.java?rev=1029575&r1=1029574&r2=1029575&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/Behavior.java (original)
+++ click/trunk/click/framework/src/org/apache/click/Behavior.java Mon Nov  1 08:25:29 2010
@@ -31,7 +31,7 @@ package org.apache.click;
  *
  * <ul>
  * <li>preResponse - occurs before the control markup is written to the response</li>
- * <li>preGetHeadElements - occurs after <tt>preResponse</tt> but before
the control
+ * <li>preRenderHeadElements - occurs after <tt>preResponse</tt> but before
the control
  * {@link Control#getHeadElements() HEAD elements} are written to the response</li>
  * <li>preDestroy - occurs before the Control {@link Control#onDestroy() onDestroy}
  * event handler.</li>
@@ -61,7 +61,7 @@ public interface Behavior {
      *
      * @param source the control the behavior is registered with
      */
-    public void preGetHeadElements(Control source);
+    public void preRenderHeadElements(Control source);
 
     /**
      * This event occurs before the Control {@link Control#onDestroy() onDestroy}

Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ClickServlet.java?rev=1029575&r1=1029574&r2=1029575&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ClickServlet.java Mon Nov  1 08:25:29
2010
@@ -614,7 +614,7 @@ public class ClickServlet extends HttpSe
         }
 
         controlRegistry.processPreResponse(context);
-        controlRegistry.processPreGetHeadElements(context);
+        controlRegistry.processPreRenderHeadElements(context);
         performRender(page, context, actionResult);
     }
 
@@ -1816,7 +1816,7 @@ public class ClickServlet extends HttpSe
                 actionResult = performPageAction(page, pageAction, context);
 
                 controlRegistry.processPreResponse(context);
-                controlRegistry.processPreGetHeadElements(context);
+                controlRegistry.processPreRenderHeadElements(context);
 
                 renderActionResult(actionResult, page, context);
             }
@@ -1840,7 +1840,7 @@ public class ClickServlet extends HttpSe
                 // Ensure we execute the beforeResponse and beforeGetHeadElements
                 // for Ajax requests
                 controlRegistry.processPreResponse(context);
-                controlRegistry.processPreGetHeadElements(context);
+                controlRegistry.processPreRenderHeadElements(context);
 
                 actionResult = eventDispatcher.getActionResult();
 
@@ -1874,7 +1874,7 @@ public class ClickServlet extends HttpSe
                 }
 
                 controlRegistry.processPreResponse(context);
-                controlRegistry.processPreGetHeadElements(context);
+                controlRegistry.processPreRenderHeadElements(context);
                 performRender(page, context);
             }
         } else {

Modified: click/trunk/click/framework/src/org/apache/click/ControlRegistry.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ControlRegistry.java?rev=1029575&r1=1029574&r2=1029575&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ControlRegistry.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ControlRegistry.java Mon Nov  1 08:25:29
2010
@@ -79,7 +79,7 @@ import org.apache.commons.lang.Validate;
  *             }
  *
  *             // This method is invoked before the HEAD elements are retrieved for each
Control
- *             public void preGetHeadElements(Control source) {
+ *             public void preRenderHeadElements(Control source) {
  *             }
  *
  *             // This method is invoked before the Control onDestroy event
@@ -150,7 +150,7 @@ public class ControlRegistry {
      * Register a control event interceptor for the given Control and Behavior.
      * The control will be passed as the source control to the Behavior
      * interceptor methods:
-     * {@link org.apache.click.Behavior#preGetHeadElements(org.apache.click.Control) preGetHeadElements(Control)},
+     * {@link org.apache.click.Behavior#preRenderHeadElements(org.apache.click.Control) preRenderHeadElements(Control)},
      * {@link org.apache.click.Behavior#preResponse(org.apache.click.Control) preResponse(Control)}
and
      * {@link org.apache.click.Behavior#preDestroy(org.apache.click.Control) preDestroy(Control)}.
      *
@@ -242,11 +242,11 @@ public class ControlRegistry {
         }
     }
 
-    void processPreGetHeadElements(Context context) {
+    void processPreRenderHeadElements(Context context) {
         if (hasAjaxTargetControls()) {
             for (Control control : getAjaxTargetControls()) {
                 for (Behavior behavior : control.getBehaviors()) {
-                    behavior.preGetHeadElements(control);
+                    behavior.preRenderHeadElements(control);
                 }
             }
         }
@@ -255,7 +255,7 @@ public class ControlRegistry {
             for (InterceptorHolder interceptorHolder : getInterceptors()) {
                 Behavior interceptor = interceptorHolder.getInterceptor();
                 Control control = interceptorHolder.getControl();
-                interceptor.preGetHeadElements(control);
+                interceptor.preRenderHeadElements(control);
             }
         }
     }

Modified: click/trunk/click/framework/src/org/apache/click/ajax/DefaultAjaxBehavior.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ajax/DefaultAjaxBehavior.java?rev=1029575&r1=1029574&r2=1029575&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ajax/DefaultAjaxBehavior.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ajax/DefaultAjaxBehavior.java Mon Nov
 1 08:25:29 2010
@@ -65,7 +65,7 @@ public class DefaultAjaxBehavior impleme
     public void preResponse(Control source) {
     }
 
-    public void preGetHeadElements(Control source) {
+    public void preRenderHeadElements(Control source) {
         // Guard against adding HEAD elements to more than one control
         if (headElementsProcessed) {
             return;

Modified: click/trunk/click/mock/src/org/apache/click/MockContext.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/src/org/apache/click/MockContext.java?rev=1029575&r1=1029574&r2=1029575&view=diff
==============================================================================
--- click/trunk/click/mock/src/org/apache/click/MockContext.java (original)
+++ click/trunk/click/mock/src/org/apache/click/MockContext.java Mon Nov  1 08:25:29 2010
@@ -339,12 +339,12 @@ public class MockContext extends Context
     }
 
     /**
-     * Execute the preGetHeadElements method for all registered behaviors.
+     * Execute the preRenderHeadElements method for all registered behaviors.
      */
-    public void executePreGetHeadElements() {
+    public void executePreRenderHeadElements() {
         ControlRegistry registry = ControlRegistry.getThreadLocalRegistry();
 
-        registry.processPreGetHeadElements(this);
+        registry.processPreRenderHeadElements(this);
     }
 
     /**

Modified: click/trunk/click/mock/test/org/apache/click/MockContextTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/MockContextTest.java?rev=1029575&r1=1029574&r2=1029575&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/MockContextTest.java (original)
+++ click/trunk/click/mock/test/org/apache/click/MockContextTest.java Mon Nov  1 08:25:29
2010
@@ -37,7 +37,7 @@ public class MockContextTest extends Tes
     private boolean submitCalled = false;
 
     /** Indicators that behavior events was invoked. */
-    private boolean preGetHeadElementsCalled = false;
+    private boolean preRenderHeadElementsCalled = false;
     private boolean preResponseCalled = false;
     private boolean preDestroyCalled = false;
 
@@ -207,7 +207,7 @@ public class MockContextTest extends Tes
 
         Submit submit = new Submit("save");
 
-        preGetHeadElementsCalled = false;
+        preRenderHeadElementsCalled = false;
         preResponseCalled = false;
         preDestroyCalled = false;
 
@@ -217,8 +217,8 @@ public class MockContextTest extends Tes
                 preDestroyCalled = true;
             }
 
-            public void preGetHeadElements(Control source) {
-                preGetHeadElementsCalled = true;
+            public void preRenderHeadElements(Control source) {
+                preRenderHeadElementsCalled = true;
             }
 
             public void preResponse(Control source) {
@@ -235,11 +235,11 @@ public class MockContextTest extends Tes
         context.executePreResponse();
         assertTrue("preResponse was not processed", preResponseCalled);
 
-        // Process the preGetHeadElements interceptor methods
-        context.executePreGetHeadElements();
-        assertTrue("preGetHeadElements was not processed", preGetHeadElementsCalled);
+        // Process the preRenderHeadElements interceptor methods
+        context.executePreRenderHeadElements();
+        assertTrue("preRenderHeadElements was not processed", preRenderHeadElementsCalled);
 
-        // Process the preGetHeadElements interceptor methods
+        // Process the preRenderHeadElements interceptor methods
         context.executePreDestroy();
         assertTrue("preDestroy was not processed", preDestroyCalled);
 
@@ -258,7 +258,7 @@ public class MockContextTest extends Tes
 
         Submit submit = new Submit("save");
 
-        preGetHeadElementsCalled = false;
+        preRenderHeadElementsCalled = false;
         preResponseCalled = false;
         preDestroyCalled = false;
 
@@ -276,8 +276,8 @@ public class MockContextTest extends Tes
                 preDestroyCalled = true;
             }
 
-            public void preGetHeadElements(Control source) {
-                preGetHeadElementsCalled = true;
+            public void preRenderHeadElements(Control source) {
+                preRenderHeadElementsCalled = true;
             }
 
             public void preResponse(Control source) {
@@ -313,7 +313,7 @@ public class MockContextTest extends Tes
         Submit submit = new Submit("save");
 
         submitCalled = false;
-        preGetHeadElementsCalled = false;
+        preRenderHeadElementsCalled = false;
         preResponseCalled = false;
         preDestroyCalled = false;
 
@@ -332,8 +332,8 @@ public class MockContextTest extends Tes
             }
 
             @Override
-            public void preGetHeadElements(Control source) {
-                preGetHeadElementsCalled = true;
+            public void preRenderHeadElements(Control source) {
+                preRenderHeadElementsCalled = true;
             }
 
             @Override
@@ -368,11 +368,11 @@ public class MockContextTest extends Tes
         context.executePreResponse();
         assertTrue("preResponse was not processed", preResponseCalled);
 
-        // Process the preGetHeadElements interceptor methods
-        context.executePreGetHeadElements();
-        assertTrue("preGetHeadElements was not processed", preGetHeadElementsCalled);
+        // Process the preRenderHeadElements interceptor methods
+        context.executePreRenderHeadElements();
+        assertTrue("preRenderHeadElements was not processed", preRenderHeadElementsCalled);
 
-        // Process the preGetHeadElements interceptor methods
+        // Process the preRenderHeadElements interceptor methods
         context.executePreDestroy();
         assertTrue("preDestroy was not processed", preDestroyCalled);
 



Mime
View raw message