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

public class HelpAction extends BaseAction
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:
  • Constructor Details

    • HelpAction

      public HelpAction()
  • Method Details

    • actionRequiresLogin

      protected boolean actionRequiresLogin()
      For security purposes, help pages are access-protected.
      Specified by:
      actionRequiresLogin in class BaseAction
      Returns:
      true
    • doWork

      protected String doWork() throws Exception
      Processes page argument and attempts to find help text for the given page. Sets helpPageText accordingly.
      Specified by:
      doWork in class BaseAction
      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

      public void setPage(String referringPage)
      Sets the page caller requires help with
      Parameters:
      referringPage - page about which help is desired
    • getHelpPageText

      public String getHelpPageText()
      Returns textual help
      Returns:
      help text