click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1037395 - in /click/trunk/click/framework/src/org/apache/click: ActionEventDispatcher.java ActionResult.java ControlRegistry.java ajax/AjaxBehavior.java ajax/DefaultAjaxBehavior.java element/ResourceElement.java
Date Sun, 21 Nov 2010 08:43:27 GMT
Author: sabob
Date: Sun Nov 21 08:43:27 2010
New Revision: 1037395

URL: http://svn.apache.org/viewvc?rev=1037395&view=rev
Log:
javadoc

Modified:
    click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java
    click/trunk/click/framework/src/org/apache/click/ActionResult.java
    click/trunk/click/framework/src/org/apache/click/ControlRegistry.java
    click/trunk/click/framework/src/org/apache/click/ajax/AjaxBehavior.java
    click/trunk/click/framework/src/org/apache/click/ajax/DefaultAjaxBehavior.java
    click/trunk/click/framework/src/org/apache/click/element/ResourceElement.java

Modified: click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java?rev=1037395&r1=1037394&r2=1037395&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java Sun Nov 21
08:43:27 2010
@@ -94,6 +94,11 @@ public class ActionEventDispatcher {
 
     // Constructors -----------------------------------------------------------
 
+    /**
+     * Construct the ActionEventDispatcher with the given ConfigService.
+     *
+     * @param configService the click application configuration service
+     */
     public ActionEventDispatcher(ConfigService configService) {
         this.logger = configService.getLogService();
     }
@@ -146,6 +151,9 @@ public class ActionEventDispatcher {
      * Unlike {@link #getThreadLocalDispatcher()} this method can safely be used
      * and will not throw an exception if an ActionEventDispatcher is not
      * available on the current thread.
+     *
+     * @return true if an ActionEventDispatcher instance is available on the
+     * current thread, false otherwise
      */
     public static boolean hasThreadLocalDispatcher() {
         DispatcherStack dispatcherStack = THREAD_LOCAL_DISPATCHER_STACK.get();

Modified: click/trunk/click/framework/src/org/apache/click/ActionResult.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ActionResult.java?rev=1037395&r1=1037394&r2=1037395&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ActionResult.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ActionResult.java Sun Nov 21 08:43:27
2010
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletRes
 import org.apache.click.util.ClickUtils;
 
 /**
- * Provides an ActionResult that is returned by Page Actions and Ajax Behaviors.
+ * Provides an ActionResult that is returned by Page Actions and AjaxBehaviors.
  * ActionResults are often used to return a partial response to the browser
  * instead of the full page content.
  * <p/>
@@ -45,7 +45,7 @@ import org.apache.click.util.ClickUtils;
  * <h3>Ajax Behavior</h3>
  *
  * Ajax requests are handled by adding an {@link org.apache.click.ajax.AjaxBehavior Ajax
Behavior}
- * to a control. The AjaxBehavior {@link org.apache.click.Behavior#onAction(org.apache.click.Control)
onAction}
+ * to a control. The AjaxBehavior {@link org.apache.click.ajax.AjaxBehavior#onAction(org.apache.click.Control)
onAction}
  * method will handle the request and return a ActionResult instance that contains
  * the response, thus bypassing the rendering of the Page template. For example:
  *

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=1037395&r1=1037394&r2=1037395&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ControlRegistry.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ControlRegistry.java Sun Nov 21 08:43:27
2010
@@ -140,6 +140,9 @@ public class ControlRegistry {
      * Unlike {@link #getThreadLocalRegistry()} this method can safely be used
      * and will not throw an exception if a ControlRegistry is not available on
      * the current thread.
+     *
+     * @return true if an ControlRegistry instance is available on the
+     * current thread, false otherwise
      */
     public static boolean hasThreadLocalRegistry() {
         RegistryStack registryStack = THREAD_LOCAL_REGISTRY_STACK.get();
@@ -181,7 +184,7 @@ public class ControlRegistry {
      * {@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)}.
      *
-     * @param source the interceptor source control
+     * @param control the interceptor source control
      * @param controlInterceptor the control interceptor to register
      */
     public static void registerInterceptor(Control control, Behavior controlInterceptor)
{

Modified: click/trunk/click/framework/src/org/apache/click/ajax/AjaxBehavior.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ajax/AjaxBehavior.java?rev=1037395&r1=1037394&r2=1037395&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ajax/AjaxBehavior.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ajax/AjaxBehavior.java Sun Nov 21 08:43:27
2010
@@ -40,8 +40,20 @@ import org.apache.click.Control;
 public interface AjaxBehavior extends Behavior {
 
     /**
+     * This method can be implemented to handle and respond to an Ajax request.
+     * For example:
      *
-     * TODO: javadoc
+     * <pre class="prettyprint">
+     * public void onInit() {
+     *     ActionLink link = new ActionLink("link");
+     *     link.addBehaior(new DefaultAjaxBehavior() {
+     *
+     *         public ActionResult onAction(Control source) {
+     *             ActionResult result = new ActionResult("&lt;h1&gt;Hello world&lt;/h1&gt;",
ActionResult.HTML);
+     *             return result;
+     *         }
+     *     });
+     * } </pre>
      *
      * @param source the control the behavior is attached to
      * @return the action result instance

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=1037395&r1=1037394&r2=1037395&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 Sun Nov
21 08:43:27 2010
@@ -45,7 +45,7 @@ public class DefaultAjaxBehavior impleme
     // Behavior Methods -------------------------------------------------------
 
     /**
-     * @see org.apache.click.Behavior#onAction(org.apache.click.Control)
+     * @see org.apache.click.ajax.AjaxBehavior#onAction(org.apache.click.Control)
      *
      * @param source the control the behavior is registered with
      * @return the action result

Modified: click/trunk/click/framework/src/org/apache/click/element/ResourceElement.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/element/ResourceElement.java?rev=1037395&r1=1037394&r2=1037395&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/element/ResourceElement.java (original)
+++ click/trunk/click/framework/src/org/apache/click/element/ResourceElement.java Sun Nov
21 08:43:27 2010
@@ -260,7 +260,7 @@ public class ResourceElement extends Ele
      * Returns the element render {@link #getId() ID} attribute status, default
      * value is true.
      *
-     * @see {@link #setRenderId(boolean)}
+     * @see #setRenderId(boolean)
      *
      * @return the element render id attribute status, default value is true
      */



Mime
View raw message