click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1037112 - in /click/trunk/click/framework/src/org/apache/click: control/AbstractControl.java util/ActionListenerAdaptor.java
Date Sat, 20 Nov 2010 05:25:36 GMT
Author: sabob
Date: Sat Nov 20 05:25:35 2010
New Revision: 1037112

URL: http://svn.apache.org/viewvc?rev=1037112&view=rev
Log:
deprecate ActionListenerAdaptor. CLK-731

Modified:
    click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java
    click/trunk/click/framework/src/org/apache/click/util/ActionListenerAdaptor.java

Modified: click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java?rev=1037112&r1=1037111&r2=1037112&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java Sat Nov
20 05:25:35 2010
@@ -221,7 +221,14 @@ public abstract class AbstractControl im
      */
     public ActionListener getActionListener() {
         if (actionListener == null && listener != null && listenerMethod
!= null) {
-            actionListener = new ActionListenerAdaptor(listener, listenerMethod);
+            actionListener = new ActionListener() {
+
+                private static final long serialVersionUID = 1L;
+
+                public boolean onAction(Control source) {
+                    return ClickUtils.invokeListener(listener, listenerMethod);
+                }
+            };
         }
         return actionListener;
     }

Modified: click/trunk/click/framework/src/org/apache/click/util/ActionListenerAdaptor.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/util/ActionListenerAdaptor.java?rev=1037112&r1=1037111&r2=1037112&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/util/ActionListenerAdaptor.java (original)
+++ click/trunk/click/framework/src/org/apache/click/util/ActionListenerAdaptor.java Sat Nov
20 05:25:35 2010
@@ -25,6 +25,9 @@ import org.apache.click.Control;
 
 /**
  * Provides an ActionListener adaptor instance.
+ *
+ * @deprecated ActionListener only has a single method to implement, there is
+ * no need for an adaptor
  */
 public class ActionListenerAdaptor implements ActionListener, Serializable {
 



Mime
View raw message