Class CmsErrorBean

java.lang.Object
org.opencms.jsp.util.CmsErrorBean

public class CmsErrorBean extends Object
Class to display the error dialog.

Since:
6.0.0
  • Field Details

  • Constructor Details

    • CmsErrorBean

      public CmsErrorBean(CmsObject cms, Throwable throwable)
      Constructs a new error bean.

      Parameters:
      cms - the current CmsObject
      throwable - the exception that was caught
  • Method Details

    • getDefaultButtonsHtml

      Returns the html code for the buttons, when the errorpage is included from outside the workplace.

      Returns:
      the default html for the buttons
    • getErrorMessage

      Returns the error message to be displayed.

      Returns:
      the error message to be displayed
    • getMessage

      Returns the localized Message, if the argument is a CmsException, or the message otherwise.

      Parameters:
      t - the Throwable to get the message from
      Returns:
      returns the localized Message, if the argument is a CmsException, or the message otherwise
    • setButtons

      public void setButtons(String buttons)
      Sets the buttons.

      Parameters:
      buttons - the buttons to set
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      Sets the error message which can be displayed if no exception is there.

      Parameters:
      errorMessage - the error message to set
    • setHiddenParams

      public void setHiddenParams(String hiddenParams)
      Sets the hiddenParams.

      Parameters:
      hiddenParams - the hiddenParams to set
    • setParamAction

      public void setParamAction(String paramAction)
      Sets the action parameter.

      Parameters:
      paramAction - the action parameter to set
    • setTitle

      public void setTitle(String title)
      Sets the title of the error page.

      Parameters:
      title - of the error page
    • toHtml

      public String toHtml()
      Returns the html code for a errorpage.

      Returns:
      the html for the errorpage