com.ervacon.springframework.web.servlet.mvc.webflow
Class SignalEventAction

java.lang.Object
  extended bycom.ervacon.springframework.web.servlet.mvc.webflow.SignalEventAction
All Implemented Interfaces:
Action

public class SignalEventAction
extends java.lang.Object
implements Action

Simple action that takes a String value from the flow model and signals (returns) it as an event. This is usefull if you want to implement conditional behaviour in your flow based on the value of a certain "flag" in the flow model.

Exposed configuration properties:

name default description
eventModelName null The name of the event in the flow model.

Author:
Erwin Vervaet

Field Summary
 
Fields inherited from interface com.ervacon.springframework.web.servlet.mvc.webflow.Action
ERROR, OK
 
Constructor Summary
SignalEventAction()
           
 
Method Summary
 java.lang.String execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.util.Map model)
          Execute the action and return and signal an event that allows the containing flow to continue.
 void setEventModelName(java.lang.String eventModelName)
          Set the name of the event in the flow model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignalEventAction

public SignalEventAction()
Method Detail

setEventModelName

public void setEventModelName(java.lang.String eventModelName)

Set the name of the event in the flow model.


execute

public java.lang.String execute(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                java.util.Map model)
Description copied from interface: Action

Execute the action and return and signal an event that allows the containing flow to continue. A null return value is not allowed: an action must return a valid event!

Note that actions cannot throw checked exceptions. They should signal an appropriate event or wrap the exception in a runtime exception.

Specified by:
execute in interface Action
Parameters:
request - current HTTP request
response - current HTTP response
model - model of the flow
Returns:
event that is signaled by the action, cannot be null