MultiViewHandler
public class ViewHandlerImpl
extends javax.faces.application.ViewHandler
This is the default implementation for JSF 1.2.
While this class isn't used by the 2.0 runtime, it's kept for binary compatibility with those that extend from this class directly.
Modifier and Type | Class and Description |
---|---|
private static class |
ViewHandlerImpl.WriteBehindStateWriter
Deprecated.
Thanks to the Facelets folks for some of the concepts incorporated
into this class.
|
Modifier and Type | Field and Description |
---|---|
private ApplicationAssociate |
associate
Deprecated.
|
private int |
bufSize
Deprecated.
|
private java.lang.String[] |
configuredExtensions
Deprecated.
|
private static java.util.logging.Logger |
logger
Deprecated.
|
CHARACTER_ENCODING_KEY, DEFAULT_FACELETS_SUFFIX, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME, DISABLE_FACELET_JSF_VIEWHANDLER_PARAM_NAME, FACELETS_BUFFER_SIZE_PARAM_NAME, FACELETS_DECORATORS_PARAM_NAME, FACELETS_LIBRARIES_PARAM_NAME, FACELETS_REFRESH_PERIOD_PARAM_NAME, FACELETS_SKIP_COMMENTS_PARAM_NAME, FACELETS_SUFFIX_PARAM_NAME, FACELETS_VIEW_MAPPINGS_PARAM_NAME
Constructor and Description |
---|
ViewHandlerImpl()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.util.Locale |
calculateLocale(javax.faces.context.FacesContext context)
Deprecated.
|
java.lang.String |
calculateRenderKitId(javax.faces.context.FacesContext context)
Deprecated.
|
private java.lang.String |
convertViewId(javax.faces.context.FacesContext context,
java.lang.String viewId)
Deprecated.
Adjust the viewID per the requirements of
renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot) . |
javax.faces.component.UIViewRoot |
createView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Deprecated.
|
private void |
doRenderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
Deprecated.
This is a separate method to account for handling the content
after the view tag.
|
private boolean |
executePageToBuildView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToExecute)
Deprecated.
Execute the target view.
|
protected java.util.Locale |
findMatch(javax.faces.context.FacesContext context,
java.util.Locale pref)
Deprecated.
Attempts to find a matching locale based on
pref and
list of supported locales, using the matching algorithm
as described in JSTL 8.3.2. |
java.lang.String |
getActionURL(javax.faces.context.FacesContext context,
java.lang.String viewId)
Deprecated.
|
private ApplicationAssociate |
getAssociate(javax.faces.context.FacesContext context)
Deprecated.
|
java.lang.String |
getResourceURL(javax.faces.context.FacesContext context,
java.lang.String path)
Deprecated.
|
private static ViewHandlerResponseWrapper |
getWrapper(javax.faces.context.ExternalContext extContext)
Deprecated.
|
void |
initView(javax.faces.context.FacesContext context)
Deprecated.
Do not call the default implementation of
ViewHandler.initView(javax.faces.context.FacesContext)
if the ExternalContext.getRequestCharacterEncoding() returns a
non-null result. |
private java.lang.String |
normalizeRequestURI(java.lang.String uri,
java.lang.String mapping)
Deprecated.
if the specified mapping is a prefix mapping, and the provided
request URI (usually the value from
ExternalContext.getRequestServletPath() )
starts with mapping + '/' , prune the mapping from the
URI and return it, otherwise, return the original URI. |
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
Deprecated.
|
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId)
Deprecated.
|
private void |
send404Error(javax.faces.context.FacesContext context)
Deprecated.
|
void |
writeState(javax.faces.context.FacesContext context)
Deprecated.
|
private static final java.util.logging.Logger logger
private ApplicationAssociate associate
private java.lang.String[] configuredExtensions
private int bufSize
public void initView(javax.faces.context.FacesContext context) throws javax.faces.FacesException
ViewHandler.initView(javax.faces.context.FacesContext)
if the ExternalContext.getRequestCharacterEncoding()
returns a
non-null
result.initView
in class javax.faces.application.ViewHandler
javax.faces.FacesException
ViewHandler.initView(javax.faces.context.FacesContext)
public void renderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToRender) throws java.io.IOException, javax.faces.FacesException
renderView
in class javax.faces.application.ViewHandler
java.io.IOException
javax.faces.FacesException
private void doRenderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToRender) throws java.io.IOException, javax.faces.FacesException
This is a separate method to account for handling the content after the view tag.
Create a new ResponseWriter around this response's Writer. Set it into the FacesContext, saving the old one aside.
call encodeBegin(), encodeChildren(), encodeEnd() on the
argument UIViewRoot
.
Restore the old ResponseWriter into the FacesContext.
Write out the after view content to the response's writer.
Flush the response buffer, and remove the after view content from the request scope.
context
- the FacesContext
for the current requestviewToRender
- the view to renderjava.io.IOException
- if an error occurs rendering the view to the clientjavax.faces.FacesException
- if some error occurs within the framework
processingpublic javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context, java.lang.String viewId)
restoreView
in class javax.faces.application.ViewHandler
public javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context, java.lang.String viewId)
createView
in class javax.faces.application.ViewHandler
private boolean executePageToBuildView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewToExecute) throws java.io.IOException
context
- the FacesContext
for the current requestviewToExecute
- the view to buildtrue
if the response should be immediately flushed
to the client, otherwise false
java.io.IOException
- if an error occurs executing the pagepublic java.util.Locale calculateLocale(javax.faces.context.FacesContext context)
calculateLocale
in class javax.faces.application.ViewHandler
public java.lang.String calculateRenderKitId(javax.faces.context.FacesContext context)
calculateRenderKitId
in class javax.faces.application.ViewHandler
protected java.util.Locale findMatch(javax.faces.context.FacesContext context, java.util.Locale pref)
pref
and
list of supported locales, using the matching algorithm
as described in JSTL 8.3.2.context
- the FacesContext
for the current requestpref
- the preferred localepublic void writeState(javax.faces.context.FacesContext context) throws java.io.IOException
writeState
in class javax.faces.application.ViewHandler
java.io.IOException
public java.lang.String getActionURL(javax.faces.context.FacesContext context, java.lang.String viewId)
getActionURL
in class javax.faces.application.ViewHandler
public java.lang.String getResourceURL(javax.faces.context.FacesContext context, java.lang.String path)
getResourceURL
in class javax.faces.application.ViewHandler
private java.lang.String normalizeRequestURI(java.lang.String uri, java.lang.String mapping)
if the specified mapping is a prefix mapping, and the provided
request URI (usually the value from ExternalContext.getRequestServletPath()
)
starts with mapping + '/'
, prune the mapping from the
URI and return it, otherwise, return the original URI.
uri
- the servlet request pathmapping
- the FacesServlet mapping used for this requestprivate void send404Error(javax.faces.context.FacesContext context)
private java.lang.String convertViewId(javax.faces.context.FacesContext context, java.lang.String viewId)
Adjust the viewID per the requirements of renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
.
context
- current FacesContext
viewId
- incoming view IDprivate ApplicationAssociate getAssociate(javax.faces.context.FacesContext context)
private static ViewHandlerResponseWrapper getWrapper(javax.faces.context.ExternalContext extContext)
Copyright © 2002-2013 Oracle America, Inc. All Rights Reserved.