|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.spray.loader.task.Action
org.norther.tammi.spray.loader.task.ActionEvent
public abstract class ActionEvent
ActionEvent is an alternative to Action that allows you to do event based actions. Essentially, you label all your submit buttons and methods with the prefix of "submit". For example, "submitDelete". Then any class that subclasses this class will get its submitDelete method executed.
If the named submit method was not implemented, it executes the generic submit method, named "submit", that must always be implemented.
Based on ActionEvent in the Apache Jakarta Turbine
project.
| Constructor Summary | |
|---|---|
ActionEvent()
Constructs a new action event. |
|
| Method Summary | |
|---|---|
void |
execute(ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
Executes the submitted event. |
protected Method |
getAction(Map params)
Gets the submit method present in a parameter map. |
protected Method |
getAction(Map params,
String className)
Gets the qualified submit method present in a parameter map. |
protected Method |
getAction(String action)
Gets the named submit method. |
protected Class[] |
getSignature()
Gets the action class specific signature. |
void |
initialize(ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
Initializes customized functionality after construction but before the first execution. |
protected void |
invoke(Method method,
Object[] args)
Invokes a method. |
void |
submit(ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
Implements the default submit method if the specific one is not implemented. |
| Methods inherited from class org.norther.tammi.spray.loader.task.Action |
|---|
find, getFilter, getMBeanServer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActionEvent()
| Method Detail |
|---|
public void initialize(ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
Task
initialize in interface Taskinitialize in class Actionrequest - the request.response - the response.chain - the filter chain.context - a task specific context.
public void execute(ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
throws Exception
execute in interface Taskexecute in class Actionrequest - the request.response - the response.chain - the filter chain.context - the context.
Exception - on errors.
public void submit(ServletRequest request,
ServletResponse response,
FilterChain chain,
Object context)
throws Exception
request - the request.response - the response.chain - the filter chain.context - the template context.
Exception - on errors.protected Method getAction(String action)
action - the action name.
protected Method getAction(Map params)
params - the parameter map.
protected Method getAction(Map params,
String className)
An optional class name is appended to the action parameter name to get a qualified submit method. If a qualified method is not available, the class name is removed and a non-qualified method returned.
params - the parameter map.className - an optional class name.
protected void invoke(Method method,
Object[] args)
throws Exception
method - the method.args - the arguments.
Exception - on errors.protected Class[] getSignature()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||