The Action interface contains the a single method execute(). The business logic of the action is executed within this method. This method is implemented by the derived class. For example
public String execute() throws Exception { setMessage(getText(ACTIONMESSAGE)); // Some Bussiness Logic return SUCCESS; }
It also contains the fields SUCCESS, NONE, ERROR, INPUT, and LOGIN.
SUCCESS- This is a string and it is returned when operation is success full.
INPUT- This field is uses when the application requires default form.
ERROR- This field is used when application execution is failure. Generally it forwarded to the view which representing the error message.
LOGIN- When application need login from the user then this field is used. It forwarded to the login view to get login from user.
NONE- If the execution of action is successful but you do not want to show any view then this field is used.
Advertisements
Ads
Ads