You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by he...@apache.org on 2003/06/22 21:07:00 UTC
cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/util/velocity VelocityActionEvent.java
henning 2003/06/22 12:07:00
Modified: src/java/org/apache/turbine/util/velocity
VelocityActionEvent.java
Log:
Some more debugging in VelocityActionEvents. Useful when hunting ghosts.
Revision Changes Path
1.11 +15 -2 jakarta-turbine-2/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java
Index: VelocityActionEvent.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/velocity/VelocityActionEvent.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- VelocityActionEvent.java 11 Apr 2003 13:15:11 -0000 1.10
+++ VelocityActionEvent.java 22 Jun 2003 19:07:00 -0000 1.11
@@ -58,6 +58,9 @@
import java.util.Iterator;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.apache.turbine.modules.ActionEvent;
import org.apache.turbine.services.velocity.TurbineVelocity;
import org.apache.turbine.util.RunData;
@@ -84,6 +87,10 @@
*/
public abstract class VelocityActionEvent extends ActionEvent
{
+
+ /** Use this to get the right class even when extended */
+ private Log log = LogFactory.getLog(this.getClass());
+
/**
* You need to implement this in your classes that extend this
* class.
@@ -145,7 +152,8 @@
if (theButton == null)
{
- throw new NoSuchMethodException("ActionEvent: The button was null");
+ throw new NoSuchMethodException(
+ "ActionEvent: The button was null");
}
try
@@ -161,11 +169,16 @@
Method method = getClass().getMethod(theButton, classes);
args[0] = data;
args[1] = context;
+
+ log.debug("Invoking " + method);
+
method.invoke(this, args);
}
catch (NoSuchMethodException nsme)
{
// Attempt to execute things the old way..
+ log.debug("Couldn't locate the Event, running executeEvents() in "
+ + super.getClass().getName());
super.executeEvents(data);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org