webwork.action
Interface Action

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ActionSupport, AppendIteratorFilter, HelloAction, IteratorGenerator, MergeIteratorFilter, NoContent, SortIteratorFilter, SubsetIteratorFilter

public interface Action
extends java.io.Serializable

All Actions must minimally implement this interface. It provides the execute method, which is done by actions to perform whatever their purpose is.

Version:
$Revision: 1.6 $
Author:
Rickard Öberg (rickard@middleware-company.com)
See Also:
ActionSupport

Field Summary
static java.lang.String ERROR
          The action execution was a failure.
static java.lang.String INPUT
          The action execution require more input in order to succeed.
static java.lang.String LOGIN
          The action could not execute, since the user most was not logged in.
static java.lang.String NONE
          The action execution was successful but do not show a view.
static java.lang.String SUCCESS
          The action execution was successful.
 
Method Summary
 java.lang.String execute()
          This method is where the logic of the action is executed.
 

Field Detail

SUCCESS

public static final java.lang.String SUCCESS
The action execution was successful. Show result view to the end user.

See Also:
Constant Field Values

NONE

public static final java.lang.String NONE
The action execution was successful but do not show a view. This is useful for actions that are handling the view in another fashion like redirect.

See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
The action execution was a failure. Show an error view, possibly asking the user to retry entering data.

See Also:
Constant Field Values

INPUT

public static final java.lang.String INPUT
The action execution require more input in order to succeed. This result is typically used if a form handling action has been executed so as to provide defaults for a form. The form associated with the handler should be shown to the end user. This result is also used if the given input parameters are invalid, meaning the user should try providing input again.

See Also:
Constant Field Values

LOGIN

public static final java.lang.String LOGIN
The action could not execute, since the user most was not logged in. The login view should be shown.

See Also:
Constant Field Values
Method Detail

execute

public java.lang.String execute()
                         throws java.lang.Exception
This method is where the logic of the action is executed. Parameters are passed by calling set-methods, or by implementing the ParameterAware interface.

Returns:
a string representing the logical result of the execution. See constants in this interface for a list of standard result values.
Throws:
java.lang.Exception - thrown if a system level exception occurs. Application level exceptions should be handled by returning an error value, such as Action.ERROR.


Copyright © 2001-2003 WebWork All Rights Reserved.