Package org.opencms.jsp.util
Class CmsErrorBean
- java.lang.Object
-
- org.opencms.jsp.util.CmsErrorBean
-
public class CmsErrorBean extends java.lang.Object
Class to display the error dialog.- Since:
- 6.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ERRORPAGE
Name of the property file containing HTML fragments for setup wizard and error dialog.
-
Constructor Summary
Constructors Constructor Description CmsErrorBean(CmsObject cms, java.lang.Throwable throwable)
Constructs a new error bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultButtonsHtml()
Returns the html code for the buttons, when the errorpage is included from outside the workplace.java.lang.String
getErrorMessage()
Returns the error message to be displayed.java.lang.String
getMessage(java.lang.Throwable t)
Returns the localized Message, if the argument is a CmsException, or the message otherwise.void
setButtons(java.lang.String buttons)
Sets the buttons.void
setErrorMessage(java.lang.String errorMessage)
Sets the error message which can be displayed if no exception is there.void
setHiddenParams(java.lang.String hiddenParams)
Sets the hiddenParams.void
setParamAction(java.lang.String paramAction)
Sets the action parameter.void
setTitle(java.lang.String title)
Sets the title of the error page.java.lang.String
toHtml()
Returns the html code for a errorpage.
-
-
-
Field Detail
-
ERRORPAGE
public static final java.lang.String ERRORPAGE
Name of the property file containing HTML fragments for setup wizard and error dialog.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsErrorBean
public CmsErrorBean(CmsObject cms, java.lang.Throwable throwable)
Constructs a new error bean.- Parameters:
cms
- the current CmsObjectthrowable
- the exception that was caught
-
-
Method Detail
-
getDefaultButtonsHtml
public java.lang.String 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
public java.lang.String getErrorMessage()
Returns the error message to be displayed.- Returns:
- the error message to be displayed
-
getMessage
public java.lang.String getMessage(java.lang.Throwable t)
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(java.lang.String buttons)
Sets the buttons.- Parameters:
buttons
- the buttons to set
-
setErrorMessage
public void setErrorMessage(java.lang.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(java.lang.String hiddenParams)
Sets the hiddenParams.- Parameters:
hiddenParams
- the hiddenParams to set
-
setParamAction
public void setParamAction(java.lang.String paramAction)
Sets the action parameter.- Parameters:
paramAction
- the action parameter to set
-
setTitle
public void setTitle(java.lang.String title)
Sets the title of the error page.- Parameters:
title
- of the error page
-
toHtml
public java.lang.String toHtml()
Returns the html code for a errorpage.- Returns:
- the html for the errorpage
-
-