org.apache.turbine.util.webmacro
Class WebMacroActionEvent

java.lang.Object
  |
  +--org.apache.turbine.modules.Assembler
        |
        +--org.apache.turbine.modules.Action
              |
              +--org.apache.turbine.modules.ActionEvent
                    |
                    +--org.apache.turbine.util.webmacro.WebMacroActionEvent
Direct Known Subclasses:
WebMacroSiteAction

public abstract class WebMacroActionEvent
extends ActionEvent

If you are using WebMacroSite stuff, then your Action's should extend this class instead of extending the ActionEvent class. The difference between this class and the ActionEvent class is that this class will first attempt to execute one of your doMethod's with a constructor like this:

doEvent(RunData data, WebContext context)

It gets the context from the TemplateInfo.getTemplateContext() method. If it can't find a method like that, then it will try to execute the method without the WebContext in it.

Version:
$Id$
Author:
Jon S. Stevens

Fields inherited from class org.apache.turbine.modules.ActionEvent
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Constructor Summary
WebMacroActionEvent()
           
 
Method Summary
abstract  void doPerform(RunData data)
          You need to implement this in your classes that extend this class.
 void executeEvents(RunData data, org.webmacro.servlet.WebContext context)
          This method should be called to execute the event based system.
protected  void perform(RunData data)
          This overrides the default Action.perform() to execute the doEvent() method.
 
Methods inherited from class org.apache.turbine.modules.ActionEvent
executeEvents, firstLetterCaps, formatString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

WebMacroActionEvent

public WebMacroActionEvent()
Method Detail

doPerform

public abstract void doPerform(RunData data)
                        throws java.lang.Exception
You need to implement this in your classes that extend this class.
Overrides:
doPerform in class ActionEvent
Parameters:
data - A Turbine RunData object.
Throws:
Exception, - a generic exception.

perform

protected void perform(RunData data)
                throws java.lang.Exception
This overrides the default Action.perform() to execute the doEvent() method. If that fails, then it will execute the doPerform() method instead.
Overrides:
perform in class ActionEvent
Parameters:
data - A Turbine RunData object.
Throws:
Exception, - a generic exception.

executeEvents

public void executeEvents(RunData data,
                          org.webmacro.servlet.WebContext context)
                   throws java.lang.Exception
This method should be called to execute the event based system.
Parameters:
data - A Turbine RunData object.
context - WebMacro context information.
Throws:
Exception, - a generic exception.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.