in src/java/org/apache/turbine/modules/ActionEvent.java [210:283]
protected void executeEvents(ParameterParser pp, Class<?>[] signature, Object[] parameters)
throws Exception
{
// Name of the button.
String theButton = null;
String button = pp.convert(BUTTON);
String key = null;
// Loop through and find the button.
for (String k : pp)
{
key = k;
if (key.startsWith(button))
{
if (considerKey(key, pp))
{
theButton = key;
break;
}
}
}
if (theButton == null)
{
theButton = BUTTON + DEFAULT_METHOD;
key = null;
}
theButton = formatString(theButton, pp);
Method method = null;
try
{
method = getMethod(theButton, signature, pp);
}
catch (NoSuchMethodException e)
{
method = getMethod(DEFAULT_METHOD, signature, pp);
}
finally
{
if (key != null)
{
pp.remove(key);
}
}
try
{
log.debug("Invoking {}", method);
method.invoke(this, parameters);
}
catch (InvocationTargetException ite)
{
Throwable t = ite.getTargetException();
if (bubbleUpException)
{
if (t instanceof Exception)
{
throw (Exception) t;
}
else
{
throw ite;
}
}
else
{
log.error("Invokation of {}", method, t);
}
}
}