MultiViewHandler@Deprecated public class ViewHandlerImpl extends jakarta.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(jakarta.faces.context.FacesContext context)
Deprecated.
Returns an appropriate
Locale to use for this and subsequent requests for the current client. |
String |
calculateRenderKitId(jakarta.faces.context.FacesContext context)
Deprecated.
Return an appropriate
renderKitId for this and subsequent requests from the current client. |
jakarta.faces.component.UIViewRoot |
createView(jakarta.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(jakarta.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(jakarta.faces.context.FacesContext context,
String viewId)
Deprecated.
If the value returned from this method is used as the |
String |
getResourceURL(jakarta.faces.context.FacesContext context,
String path)
Deprecated.
If the value returned from this method is used as the |
String |
getWebsocketURL(jakarta.faces.context.FacesContext context,
String channel)
Deprecated.
If the value returned from this method is used as the |
void |
initView(jakarta.faces.context.FacesContext context)
Deprecated.
Do not call the default implementation of
ViewHandler.initView(jakarta.faces.context.FacesContext) if the
ExternalContext.getRequestCharacterEncoding() returns a non-null result. |
void |
renderView(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIViewRoot viewToRender)
Deprecated.
Perform whatever actions are required to render the response view to the
response object associated with the current
FacesContext. |
jakarta.faces.component.UIViewRoot |
restoreView(jakarta.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(jakarta.faces.context.FacesContext context)
Deprecated.
Take any appropriate action to either immediately write out the current state information (by calling
StateManager.writeState(jakarta.faces.context.FacesContext, java.lang.Object), or noting where state information should later be written. |
public void initView(jakarta.faces.context.FacesContext context)
throws jakarta.faces.FacesException
ViewHandler.initView(jakarta.faces.context.FacesContext) if the
ExternalContext.getRequestCharacterEncoding() returns a non-null result.initView in class jakarta.faces.application.ViewHandlercontext - the Faces context.jakarta.faces.FacesException - if a problem occurs setting the encoding, such as the
UnsupportedEncodingException thrown by the underlying Jakarta Servlet or Portlet technology when the
encoding is not supported.ViewHandler.initView(jakarta.faces.context.FacesContext)public void renderView(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIViewRoot viewToRender)
throws IOException,
jakarta.faces.FacesException
jakarta.faces.application.ViewHandler
Perform 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(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot)
method, returning the result and not swallowing any exceptions thrown by that method.
renderView in class jakarta.faces.application.ViewHandlercontext - FacesContext for the current requestviewToRender - the view to renderIOException - if an input/output error occursjakarta.faces.FacesException - if a Jakarta Servlet error occurspublic jakarta.faces.component.UIViewRoot restoreView(jakarta.faces.context.FacesContext context,
String viewId)
jakarta.faces.application.ViewHandler
Perform 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(jakarta.faces.context.FacesContext, java.lang.String) method, returning the result and not
swallowing any exceptions thrown by that method.
restoreView in class jakarta.faces.application.ViewHandlercontext - FacesContext for the current requestviewId - the view identifier for the current requestpublic jakarta.faces.component.UIViewRoot createView(jakarta.faces.context.FacesContext context,
String viewId)
jakarta.faces.application.ViewHandler
Create 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(jakarta.faces.context.FacesContext, java.lang.String), which must be called by this method.
createView in class jakarta.faces.application.ViewHandlercontext - the Faces context.viewId - the view id.public Locale calculateLocale(jakarta.faces.context.FacesContext context)
jakarta.faces.application.ViewHandler
Returns an appropriate Locale to use for this and subsequent requests for the current client.
calculateLocale in class jakarta.faces.application.ViewHandlercontext - FacesContext for the current requestpublic String calculateRenderKitId(jakarta.faces.context.FacesContext context)
jakarta.faces.application.ViewHandler
Return 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 jakarta.faces.application.ViewHandlercontext - FacesContext for the current requestprotected Locale findMatch(jakarta.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(jakarta.faces.context.FacesContext context)
throws IOException
jakarta.faces.application.ViewHandler
Take any appropriate action to either immediately write out the current state information (by calling
StateManager.writeState(jakarta.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(jakarta.faces.context.FacesContext) and then written into
the Ajax response during final encoding
(PartialViewContext.processPartial(jakarta.faces.event.PhaseId)) .
writeState in class jakarta.faces.application.ViewHandlercontext - FacesContext for the current requestIOException - if an input/output error occurspublic String getActionURL(jakarta.faces.context.FacesContext context, String viewId)
jakarta.faces.application.ViewHandler
If 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 Jakarta Server Faces lifecycle. Please see section
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 jakarta.faces.application.ViewHandlercontext - FacesContext for this requestviewId - View identifier of the desired viewpublic String getResourceURL(jakarta.faces.context.FacesContext context, String path)
jakarta.faces.application.ViewHandler
If 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 jakarta.faces.application.ViewHandlercontext - FacesContext for the current requestpath - Resource path to convert to a URLpublic String getWebsocketURL(jakarta.faces.context.FacesContext context, String channel)
jakarta.faces.application.ViewHandler
If 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 jakarta.faces.application.ViewHandlercontext - FacesContext for the current request.channel - The channel name of the websocket.PushContext.URI_PREFIXCopyright © 2010–2022 JBoss by Red Hat. All rights reserved.