Return-Path: Delivered-To: apmail-click-commits-archive@www.apache.org Received: (qmail 16654 invoked from network); 21 Nov 2010 08:44:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Nov 2010 08:44:12 -0000 Received: (qmail 66162 invoked by uid 500); 21 Nov 2010 08:44:44 -0000 Delivered-To: apmail-click-commits-archive@click.apache.org Received: (qmail 66148 invoked by uid 500); 21 Nov 2010 08:44:43 -0000 Mailing-List: contact commits-help@click.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: click-dev@click.apache.org Delivered-To: mailing list commits@click.apache.org Received: (qmail 66140 invoked by uid 99); 21 Nov 2010 08:44:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Nov 2010 08:44:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Nov 2010 08:44:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CC30D23889F1; Sun, 21 Nov 2010 08:43:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@click.apache.org From: sabob@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101121084327.CC30D23889F1@eris.apache.org> 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. *

@@ -45,7 +45,7 @@ import org.apache.click.util.ClickUtils; *

Ajax Behavior

* * 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 + *
+     * public void onInit() {
+     *     ActionLink link = new ActionLink("link");
+     *     link.addBehaior(new DefaultAjaxBehavior() {
+     *
+     *         public ActionResult onAction(Control source) {
+     *             ActionResult result = new ActionResult("<h1>Hello world</h1>", ActionResult.HTML);
+     *             return result;
+     *         }
+     *     });
+     * } 
* * @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 */