Package org.opencms.jsp.util
Class CmsErrorBean
java.lang.Object
org.opencms.jsp.util.CmsErrorBean
Class to display the error dialog.
- Since:
- 6.0.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCmsErrorBean
(CmsObject cms, Throwable throwable) Constructs a new error bean. -
Method Summary
Modifier and TypeMethodDescriptionReturns the html code for the buttons, when the errorpage is included from outside the workplace.Returns the error message to be displayed.Returns the localized Message, if the argument is a CmsException, or the message otherwise.void
setButtons
(String buttons) Sets the buttons.void
setErrorMessage
(String errorMessage) Sets the error message which can be displayed if no exception is there.void
setHiddenParams
(String hiddenParams) Sets the hiddenParams.void
setParamAction
(String paramAction) Sets the action parameter.void
Sets the title of the error page.toHtml()
Returns the html code for a errorpage.
-
Field Details
-
ERRORPAGE
Name of the property file containing HTML fragments for setup wizard and error dialog.- See Also:
-
-
Constructor Details
-
CmsErrorBean
Constructs a new error bean.- Parameters:
cms
- the current CmsObjectthrowable
- 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
Sets the buttons.- Parameters:
buttons
- the buttons to set
-
setErrorMessage
Sets the error message which can be displayed if no exception is there.- Parameters:
errorMessage
- the error message to set
-
setHiddenParams
Sets the hiddenParams.- Parameters:
hiddenParams
- the hiddenParams to set
-
setParamAction
Sets the action parameter.- Parameters:
paramAction
- the action parameter to set
-
setTitle
Sets the title of the error page.- Parameters:
title
- of the error page
-
toHtml
Returns the html code for a errorpage.- Returns:
- the html for the errorpage
-