Top Description Fields Constructors Methods
jakarta.faces.application

public Class ViewExpiredException

extends FacesException
Class Inheritance
Imports
jakarta.faces.FacesException, jakarta.faces.context.FacesContext, jakarta.faces.view.StateManagementStrategy

Implementations must throw this FacesException when attempting to restore the view StateManagementStrategy#restoreView(FacesContext, String, String) results in failure on postback.

Since
1.2

Field Summary

Modifier and TypeField and Description
private static final long
private String
viewId

The view identifier of the view that could not be restored.

Constructor Summary

AccessConstructor and Description
public
ViewExpiredException()

Construct a new exception with no detail message or root cause.

public
ViewExpiredException(String
The view identifier for this exception
viewId
)

Construct a new exception with the specified view identifier.

public
ViewExpiredException(String
The detail message for this exception
message
,
String
The view identifier for this exception
viewId
)

Construct a new exception with the specified detail message and no root cause.

public
ViewExpiredException(Throwable
The root cause for this exception
cause
,
String
The view identifier for this exception
viewId
)

Construct a new exception with the specified root cause.

public
ViewExpiredException(String
The detail message for this exception
message
,
Throwable
The root cause for this exception
cause
,
String
The view identifier for this exception
viewId
)

Construct a new exception with the specified detail message and root cause.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the message.
getMessage
()

Overrides java.lang.Throwable.getMessage.

Return the message for this exception prepended with the view identifier if the view identifier is not null, otherwise, return the message.

public String

Returns:

the view id, or null.
getViewId
()

Return the view identifier of this exception, or null if the view identifier is nonexistent or unknown.

Inherited from jakarta.faces.FacesException:
getCause

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.faces.FacesException.serialVersionUID.

viewIdback to summary
private String viewId

The view identifier of the view that could not be restored.

Constructor Detail

ViewExpiredExceptionback to summary
public ViewExpiredException()

Construct a new exception with no detail message or root cause.

ViewExpiredExceptionback to summary
public ViewExpiredException(String viewId)

Construct a new exception with the specified view identifier.

Parameters
viewId:String

The view identifier for this exception

ViewExpiredExceptionback to summary
public ViewExpiredException(String message, String viewId)

Construct a new exception with the specified detail message and no root cause.

Parameters
message:String

The detail message for this exception

viewId:String

The view identifier for this exception

ViewExpiredExceptionback to summary
public ViewExpiredException(Throwable cause, String viewId)

Construct a new exception with the specified root cause. The detail message will be set to (cause == null ? null : cause.toString()

Parameters
cause:Throwable

The root cause for this exception

viewId:String

The view identifier for this exception

ViewExpiredExceptionback to summary
public ViewExpiredException(String message, Throwable cause, String viewId)

Construct a new exception with the specified detail message and root cause.

Parameters
message:String

The detail message for this exception

cause:Throwable

The root cause for this exception

viewId:String

The view identifier for this exception

Method Detail

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Return the message for this exception prepended with the view identifier if the view identifier is not null, otherwise, return the message.

Returns:String

the message.

Annotations
@Override
getViewIdback to summary
public String getViewId()

Return the view identifier of this exception, or null if the view identifier is nonexistent or unknown.

Returns:String

the view id, or null.