Created
February 13, 2017 08:14
-
-
Save punkmonday/0ca36683495269501559a5c8dfc52512 to your computer and use it in GitHub Desktop.
MyFaceletViewHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyFaceletViewHandler extends FaceletViewHandler { | |
public MyFaceletViewHandler(ViewHandler parent) { | |
super(parent); | |
} | |
@Override | |
public UIViewRoot restoreView(FacesContext facesContext, String viewId) { | |
UIViewRoot root = super.restoreView(facesContext, viewId); | |
// do not allow ViewExpiredException | |
if (root == null) { | |
root = createView(facesContext, "/viewExpired.xhtml"); | |
facesContext.renderResponse(); | |
} | |
return root; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment