public class DefaultRestoreViewSupport extends Object implements RestoreViewSupport
Constructor and Description |
---|
DefaultRestoreViewSupport() |
DefaultRestoreViewSupport(FacesContext facesContext) |
Modifier and Type | Method and Description |
---|---|
protected static FacesServletMapping |
calculateFacesServletMapping(String servletPath,
String pathInfo)
Determines the mapping of the FacesServlet in the web.xml configuration
file.
|
String |
calculateViewId(FacesContext facesContext)
Calculates the view id from the given faces context by the following algorithm
|
protected boolean |
checkResourceExists(FacesContext context,
String viewId) |
boolean |
checkViewExists(FacesContext facesContext,
String viewId)
Check if a view exists
|
String |
deriveViewId(FacesContext context,
String viewId)
Deprecated.
|
protected String[] |
getContextSuffix(FacesContext context) |
protected String |
getFaceletsContextSuffix(FacesContext context) |
protected String[] |
getFaceletsViewMappings(FacesContext context) |
protected FacesServletMapping |
getFacesServletMapping(FacesContext context)
Read the web.xml file that is in the classpath and parse its internals to
figure out how the FacesServlet is mapped for the current webapp.
|
protected RenderKitFactory |
getRenderKitFactory() |
protected VisitContextFactory |
getVisitContextFactory() |
protected String |
handlePrefixMapping(String viewId,
String prefix)
Return the normalized viewId according to the algorithm specified in 7.5.2
by stripping off any number of occurrences of the prefix mapping from the viewId.
|
protected String |
handleSuffixMapping(FacesContext context,
String requestViewId)
Return the viewId with any non-standard suffix stripped off and replaced with
the default suffix configured for the specified context.
|
boolean |
isPostback(FacesContext facesContext)
Determine if the current request is a post back by the following algorithm.
|
void |
processComponentBinding(FacesContext facesContext,
UIComponent component)
Processes the component tree.
|
public DefaultRestoreViewSupport()
public DefaultRestoreViewSupport(FacesContext facesContext)
public void processComponentBinding(FacesContext facesContext, UIComponent component)
RestoreViewSupport
processComponentBinding
in interface RestoreViewSupport
component
- the root componentpublic String calculateViewId(FacesContext facesContext)
RestoreViewSupport
Calculates the view id from the given faces context by the following algorithm
ExternalContext.getRequestPathInfo()
ExternalContext.getRequestServletPath()
FacesException
calculateViewId
in interface RestoreViewSupport
public boolean isPostback(FacesContext facesContext)
RestoreViewSupport
Determine if the current request is a post back by the following algorithm.
Find the render-kit-id for the current request by calling calculateRenderKitId() on the Application’s ViewHandler. Get that RenderKit’s ResponseStateManager and call its isPostback() method, passing the given FacesContext.
isPostback
in interface RestoreViewSupport
protected RenderKitFactory getRenderKitFactory()
protected VisitContextFactory getVisitContextFactory()
@Deprecated public String deriveViewId(FacesContext context, String viewId)
RestoreViewSupport
deriveViewId
in interface RestoreViewSupport
protected String[] getContextSuffix(FacesContext context)
protected String getFaceletsContextSuffix(FacesContext context)
protected String[] getFaceletsViewMappings(FacesContext context)
protected String handlePrefixMapping(String viewId, String prefix)
protected String handleSuffixMapping(FacesContext context, String requestViewId)
protected boolean checkResourceExists(FacesContext context, String viewId)
public boolean checkViewExists(FacesContext facesContext, String viewId)
RestoreViewSupport
checkViewExists
in interface RestoreViewSupport
protected FacesServletMapping getFacesServletMapping(FacesContext context)
protected static FacesServletMapping calculateFacesServletMapping(String servletPath, String pathInfo)
servletPath
- The servletPath of the current requestpathInfo
- The pathInfo of the current requestCopyright © 2020 The Apache Software Foundation. All rights reserved.