net.sf.doolin.gui.action
Class MethodGUIAction

java.lang.Object
  extended by net.sf.doolin.gui.action.AbstractGUIAction
      extended by net.sf.doolin.gui.action.AbstractSimpleGUIAction
          extended by net.sf.doolin.gui.action.MethodGUIAction
All Implemented Interfaces:
GUIAction, org.springframework.beans.factory.BeanNameAware

public class MethodGUIAction
extends AbstractSimpleGUIAction

Calls a method on the model.

Author:
Damien Coraboeuf

Constructor Summary
MethodGUIAction()
           
 
Method Summary
protected  void doExecute(ActionContext context)
          Executes the action and throws any kind of error.
 void setMethodName(String methodName)
          Sets the name of the method to call on the target bean.
 void setPropertyPath(String propertyPath)
          Sets the path to the property of the target object to call the method on.
 void setUseContext(boolean useContext)
          Sets if the action contextual data must be used as a parameter to the method call.
 
Methods inherited from class net.sf.doolin.gui.action.AbstractSimpleGUIAction
getIconId, getIconIDExpression, getId, getShortcut, getShortcutExpression, getTextExpression, getTip, getTipExpression, getTitle, init, setBeanName, setIconId, setShortcut, setTip, setTitle, toString
 
Methods inherited from class net.sf.doolin.gui.action.AbstractGUIAction
execute, getActionContextData, getActionContextDataExtractor, getDisplayStateHandler, getIcon, getIconService, setActionContextDataExtractor, setDisplayStateHandler, setIconService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodGUIAction

public MethodGUIAction()
Method Detail

doExecute

protected void doExecute(ActionContext context)
                  throws Exception
Description copied from class: AbstractGUIAction
Executes the action and throws any kind of error.

Specified by:
doExecute in class AbstractGUIAction
Parameters:
context - the context
Throws:
Exception - the exception

setMethodName

public void setMethodName(String methodName)
Sets the name of the method to call on the target bean. This method must have no parameter.

Parameters:
methodName - Method name

setPropertyPath

public void setPropertyPath(String propertyPath)
Sets the path to the property of the target object to call the method on. It is set to this by default.

Parameters:
propertyPath - Property path

setUseContext

public void setUseContext(boolean useContext)
Sets if the action contextual data must be used as a parameter to the method call.

Parameters:
useContext - true if the contextual data must be used as a parameter for the method call.


Copyright © 2011. All Rights Reserved.