com.sun.faces.enableRestoreView11Compatibility
is a JSF 1.2 setting that tells JSF 1.2 to behave like JSF 1.1.
com.sun.faces.enableRestoreView11Compatibility
== true
means "do not throw a ViewExpiredException
; instead, just create a new view if the old one has expired."
The IBM notes on the JSF 1.1 behaviour say:
This can have adverse behaviors because it is a new view, and items that are usually in the view, such as state, are no longer be there.
The default JSF 1.2 behaviour is defined in the spec as this:
If the request is a postback, call ViewHandler.restoreView()
, passing the FacesContext
instance for the current request and the view identifier, and returning a UIViewRoot
for the restored view. If the return from ViewHandler.restoreView()
is null, throw a ViewExpiredException
with an appropriate error message. javax.faces.application.ViewExpiredException is a
FacesException` that must be thrown to signal to the application that the expected view was not returned for the view identifier. An application may choose to perform some action based on this exception.
To have a ViewExpiredException
thrown when the view expires, remove the com.sun.faces.enableRestoreView11Compatibility
parameter or set it to false
.
The com.sun
namespace suggests that the parameter is a Sun/Mojarra and derived implementation-specific setting, so it probably will not work with all JSF implementations.