click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r962389 - /click/trunk/click/framework/src/org/apache/click/ClickServlet.java
Date Fri, 09 Jul 2010 02:11:45 GMT
Author: sabob
Date: Fri Jul  9 02:11:45 2010
New Revision: 962389

URL: http://svn.apache.org/viewvc?rev=962389&view=rev
Log:
added more Ajax logging

Modified:
    click/trunk/click/framework/src/org/apache/click/ClickServlet.java

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=962389&r1=962388&r2=962389&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ClickServlet.java Fri Jul  9 02:11:45
2010
@@ -1867,6 +1867,21 @@ public class ClickServlet extends HttpSe
 
         Control ajaxTarget = null;
 
+        if (logger.isTraceEnabled()) {
+            logger.trace("   the following controls have been registered as potential Ajax
targets:");
+            if (callbackDispatcher.getBehaviorEnabledControls().isEmpty()) {
+                logger.trace("      *no* control has been registered");
+            } else {
+                for (Control control : callbackDispatcher.getBehaviorEnabledControls()) {
+                    HtmlStringBuffer buffer = new HtmlStringBuffer();
+                    String controlClassName = ClassUtils.getShortClassName(control.getClass());
+                    buffer.append("      ").append(controlClassName);
+                    buffer.append(": name='").append(control.getName()).append("'");
+                    logger.trace(buffer.toString());
+                }
+            }
+        }
+
         for (Control control : callbackDispatcher.getBehaviorEnabledControls()) {
 
             if (control.isAjaxTarget(context)) {
@@ -1884,7 +1899,7 @@ public class ClickServlet extends HttpSe
                 buffer.append(ajaxTarget.getName()).append("' ");
                 String className = ClassUtils.getShortClassName(ajaxTarget.getClass());
                 buffer.append(className);
-                buffer.append(".isAjaxTarget() : true (Ajax Control found)");
+                buffer.append(".isAjaxTarget() : true (target Ajax control found)");
                 logger.trace(buffer.toString());
             }
 
@@ -1905,7 +1920,7 @@ public class ClickServlet extends HttpSe
                 logger.trace(buffer.toString());
 
                 if (!eventDispatcher.hasBehaviorSourceSet()) {
-                    logger.trace("   *no* behavior was registered while processing control");
+                    logger.trace("   *no* behavior was registered while processing the control");
                 }
             }
         } else {



Mime
View raw message