MultiViewHandler@Deprecated 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.
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 |
|---|---|
Locale |
calculateLocale(javax.faces.context.FacesContext context)
Deprecated.
Returns an appropriate
Locale to use for this and
subsequent requests for the current client. |
String |
calculateRenderKitId(javax.faces.context.FacesContext context)
Deprecated.
Return an appropriate
renderKitId for this and
subsequent requests from the current client. |
javax.faces.component.UIViewRoot |
createView(javax.faces.context.FacesContext context,
String viewId)
Deprecated.
Create and
return a new
UIViewRoot instance initialized with
information from the argument FacesContext and
viewId. |
protected Locale |
findMatch(javax.faces.context.FacesContext context,
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. |
String |
getActionURL(javax.faces.context.FacesContext context,
String viewId)
Deprecated.
If
the value returned from this
method is used as the |
String |
getResourceURL(javax.faces.context.FacesContext context,
String path)
Deprecated.
If the value returned from this
method is used as the |
String |
getWebsocketURL(javax.faces.context.FacesContext context,
String channel)
Deprecated.
If the value returned from this
method is used as the |
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. |
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
Deprecated.
Perform whatever
actions are required to render the response view to the response
object associated with the current
FacesContext. |
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
String viewId)
Deprecated.
Perform whatever
actions are required to restore the view associated with the
specified
FacesContext and viewId. |
void |
writeState(javax.faces.context.FacesContext context)
Deprecated.
Take any appropriate action to either immediately
write out the current state information (by calling
StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object), or noting where state information
should later be written. |
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.ViewHandlercontext - the Faces context.javax.faces.FacesException - if a problem occurs setting the encoding,
such as the UnsupportedEncodingException thrown
by the underlying Servlet or Portlet technology when the encoding is not
supported.ViewHandler.initView(javax.faces.context.FacesContext)public void renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
throws IOException,
javax.faces.FacesException
javax.faces.application.ViewHandlerPerform whatever
actions are required to render the response view to the response
object associated with the current FacesContext.
Otherwise, the default
implementation must obtain a reference to the ViewDeclarationLanguage for the viewId of the
argument viewToRender and call its ViewDeclarationLanguage.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot) method, returning the result
and not swallowing any exceptions thrown by that method.
renderView in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestviewToRender - the view to renderIOException - if an input/output error occursjavax.faces.FacesException - if a servlet error occurspublic javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
String viewId)
javax.faces.application.ViewHandlerPerform whatever
actions are required to restore the view associated with the
specified FacesContext and viewId. It may
delegate to the restoreView of the associated StateManager to do the actual work of restoring the view. If
there is no available state for the specified
viewId, return null.
Otherwise, the default implementation
must obtain a reference to the ViewDeclarationLanguage
for this viewId and call its ViewDeclarationLanguage.restoreView(javax.faces.context.FacesContext, java.lang.String) method, returning the result
and not swallowing any exceptions thrown by that method.
restoreView in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestviewId - the view identifier for the current requestpublic javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context,
String viewId)
javax.faces.application.ViewHandlerCreate and
return a new UIViewRoot instance initialized with
information from the argument FacesContext and
viewId. Locate
the ViewDeclarationLanguage implementation for the VDL
used in the view. The argument viewId must be
converted to a physical viewId that can refer to an
actual resource suitable for use by the
ViewDeclarationLanguage ViewDeclarationLanguage.createView(javax.faces.context.FacesContext, java.lang.String), which must be called by
this method.
createView in class javax.faces.application.ViewHandlercontext - the Faces context.viewId - the view id.public Locale calculateLocale(javax.faces.context.FacesContext context)
javax.faces.application.ViewHandlerReturns an appropriate Locale to use for this and
subsequent requests for the current client.
calculateLocale in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestpublic String calculateRenderKitId(javax.faces.context.FacesContext context)
javax.faces.application.ViewHandlerReturn an appropriate renderKitId for this and
subsequent requests from the current client. It is an error for
this method to return null.
The default return value is RenderKitFactory.HTML_BASIC_RENDER_KIT.
calculateRenderKitId in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestprotected Locale findMatch(javax.faces.context.FacesContext context, 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 IOException
javax.faces.application.ViewHandlerTake any appropriate action to either immediately
write out the current state information (by calling
StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object), or noting where state information
should later be written.
This method must do nothing if the current
request is an Ajax request. When responding to
Ajax requests, the state is obtained by calling
StateManager.getViewState(javax.faces.context.FacesContext)
and then written into the Ajax response during final
encoding
(PartialViewContext.processPartial(javax.faces.event.PhaseId))
.
writeState in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestIOException - if an input/output error occurspublic String getActionURL(javax.faces.context.FacesContext context, String viewId)
javax.faces.application.ViewHandlerIf
the value returned from this
method is used as the file argument to the
four-argument constructor for java.net.URL (assuming
appropriate values are used for the first three arguments), then
a client making a request to the toExternalForm() of
that URL will select the argument
viewId for traversing the JSF lifecycle. Please see
section JSF.7.6.2 for the complete specification,
especially for details related
to view protection using the ResponseStateManager.NON_POSTBACK_VIEW_TOKEN_PARAM
and the behavior when the current request is to a URL
for which the FacesServlet has an exact mapping as defined by Servlet.12.2.
getActionURL in class javax.faces.application.ViewHandlercontext - FacesContext for this requestviewId - View identifier of the desired viewpublic String getResourceURL(javax.faces.context.FacesContext context, String path)
javax.faces.application.ViewHandlerIf the value returned from this
method is used as the file argument to the
four-argument constructor for java.net.URL (assuming
appropriate values are used for the first three arguments), then
a client making a request to the toExternalForm() of
that URL will select the argument path
for direct rendering. If the specified path starts with a slash,
it must be treated as context relative; otherwise, it must be
treated as relative to the action URL of the current view.
getResourceURL in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestpath - Resource path to convert to a URLpublic String getWebsocketURL(javax.faces.context.FacesContext context, String channel)
javax.faces.application.ViewHandlerIf the value returned from this
method is used as the file argument to the
four-argument constructor for java.net.URL (assuming
appropriate values are used for the first three arguments), then
a client making a push handshake request to the toExternalForm() of
that URL will select the argument channel
for connecting the websocket push channel in the current view.
It must match the PushContext.URI_PREFIX of the endpoint.
getWebsocketURL in class javax.faces.application.ViewHandlercontext - FacesContext for the current request.channel - The channel name of the websocket.PushContext.URI_PREFIXCopyright © 2010–2019 JBoss by Red Hat. All rights reserved.