Interface Action

All Known Implementing Classes:
ActionSupport, AppendIteratorFilter, CspReportAction, DefaultActionSupport, DefaultCspReportAction, IteratorGenerator, MergeIteratorFilter, SortIteratorFilter, SubsetIteratorFilter

public interface Action
All actions may implement this interface, which exposes the execute() method.

However, as of XWork 1.1, this is not required and is only here to assist users. You are free to create POJOs that honor the same contract defined by this interface without actually implementing the interface.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The action execution was a failure.
    static final String
    The action execution require more input in order to succeed.
    static final String
    The action could not execute, since the user most was not logged in.
    static final String
    The action execution was successful but do not show a view.
    static final String
    The action execution was successful.
  • Method Summary

    Modifier and Type
    Method
    Description
    Where the logic of the action is executed.
  • Field Details

    • SUCCESS

      static final String SUCCESS
      The action execution was successful. Show result view to the end user.
      See Also:
    • NONE

      static final 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:
    • ERROR

      static final String ERROR
      The action execution was a failure. Show an error view, possibly asking the user to retry entering data.
      See Also:
    • INPUT

      static final 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 params are invalid, meaning the user should try providing input again.

      See Also:
    • LOGIN

      static final String LOGIN
      The action could not execute, since the user most was not logged in. The login view should be shown.
      See Also:
  • Method Details

    • execute

      String execute() throws Exception
      Where the logic of the action is executed.
      Returns:
      a string representing the logical result of the execution. See constants in this interface for a list of standard result values.
      Throws:
      Exception - thrown if a system level exception occurs. Note: Application level exceptions should be handled by returning an error value, such as Action.ERROR.