Class HelpAction
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.conical.common.bbl.web.struts.actions.BaseAction
org.conical.common.bbl.web.struts.actions.HelpAction
- 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 action should be referred to when a user help button or link is clicked. It takes
one parameter, "page", which is the page for which help is desired. The action looks
this page up in the help.properties file to find the resource containing helpful
information about that specific page. If no mapping or no page exists, the action
provides sensible text.
- 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_DENIED
Fields inherited from class com.opensymphony.xwork2.ActionSupport
container
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
-
Constructor Summary
-
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, setServletResponse
Methods 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
-
HelpAction
public HelpAction()
-
-
Method Details
-
actionRequiresLogin
protected boolean actionRequiresLogin()For security purposes, help pages are access-protected.- Specified by:
actionRequiresLogin
in classBaseAction
- Returns:
- true
-
doWork
Processes page argument and attempts to find help text for the given page. Sets helpPageText accordingly.- Specified by:
doWork
in classBaseAction
- Returns:
- success (should always provide some sort of text even if parameter is missing or bad)
- Throws:
Exception
- if IO or other error occurs
-
setPage
Sets the page caller requires help with- Parameters:
referringPage
- page about which help is desired
-
getHelpPageText
Returns textual help- Returns:
- help text
-