Class ModelDrivenAction

java.lang.Object
org.apache.struts2.ActionSupport
org.apache.struts2.showcase.modelDriven.ModelDrivenAction
All Implemented Interfaces:
Serializable, Action, ValidationAware, LocaleProvider, ModelDriven, TextProvider, Validateable

public class ModelDrivenAction extends ActionSupport implements ModelDriven
Action to demonstrate simple model-driven feature of the framework.
See Also:
  • Constructor Details

    • ModelDrivenAction

      public ModelDrivenAction()
  • Method Details

    • input

      public String input() throws Exception
      Overrides:
      input in class ActionSupport
      Throws:
      Exception
    • execute

      public String execute() throws Exception
      Description copied from class: ActionSupport
      A default implementation that does nothing an returns "success".

      Subclasses should override this method to provide their business logic.

      See also Action.execute().

      Specified by:
      execute in interface Action
      Overrides:
      execute in class ActionSupport
      Returns:
      returns Action.SUCCESS
      Throws:
      Exception - can be thrown by subclasses.
    • getModel

      public Gangster getModel()
      Description copied from interface: ModelDriven
      Gets the model to be pushed onto the ValueStack instead of the Action itself.

      Please be aware that all setters and getters of every depth on the object returned by this method are available for user parameter injection!

      Specified by:
      getModel in interface ModelDriven
      Returns:
      the model