Class SampleAction
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.conical.common.bbl.web.struts.actions.BaseAction
org.conical.common.bbl.web.struts.actions.SampleAction
- All Implemented Interfaces:
com.opensymphony.xwork2.Action,com.opensymphony.xwork2.interceptor.ValidationAware,com.opensymphony.xwork2.LocaleProvider,com.opensymphony.xwork2.TextProvider,com.opensymphony.xwork2.Validateable,Serializable,org.apache.struts2.interceptor.ServletRequestAware,org.apache.struts2.interceptor.ServletResponseAware
This class exists as a simple child of BaseAction to show how little
code must be written to implement an action. It can be used as a
model for those learning Struts and the BBL Struts framework.
- Author:
- rdoherty
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.conical.common.bbl.web.struts.actions.BaseAction
BaseAction.Developer -
Field Summary
Fields inherited from class org.conical.common.bbl.web.struts.actions.BaseAction
PERMISSION_DENIEDFields inherited from class com.opensymphony.xwork2.ActionSupport
containerFields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.conical.common.bbl.web.struts.actions.BaseAction
addCookie, doAutoLogin, execute, getApplicationName, getApplicationProperties, getCookies, getCurrentUser, getDeveloper, getEthnicities, getHandednesses, getNameSuffixes, getRaces, getReligions, getRequestUrl, getRequiredAccessRoles, getSession, getSexes, getSexualOrientations, getStates, setServletRequest, setServletResponseMethods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getLocaleProvider, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
-
Constructor Details
-
SampleAction
public SampleAction()
-
-
Method Details
-
actionRequiresLogin
protected boolean actionRequiresLogin()Returns true since most applications require login.- Specified by:
actionRequiresLoginin classBaseAction- Returns:
- true
-
doWork
Performs no side effects; simply returns success.- Specified by:
doWorkin classBaseAction- Returns:
- success
- Throws:
Exception- if something goes wrong
-