Top Description Fields Constructors Methods
com.sun.faces.application.view

public Class MultiViewHandler

extends ViewHandler
Class Inheritance
Static Imports
com.sun.faces.RIConstants.FACELETS_ENCODING_KEY, .RIConstants.SAVESTATE_FIELD_MARKER, com.sun.faces.renderkit.RenderKitUtils.PredefinedPostbackParameter.RENDER_KIT_ID_PARAM, com.sun.faces.util.MessageUtils.ILLEGAL_VIEW_ID_ID, .MessageUtils.getExceptionMessageString, .Util.getFacesMapping, .Util.getFirstWildCardMappingToFacesServlet, .Util.isExactMapped, .Util.isPrefixMapped, .Util.isViewIdExactMappedToFacesServlet, .Util.notNull, java.util.Collections.unmodifiableSet, .Objects.requireNonNull, java.util.logging.Level.FINE, .Level.SEVERE, .Level.WARNING, javax.faces.FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY

This ViewHandler implementation handles both JSP-based and Facelets/PDL-based views.

Field Summary

Modifier and TypeField and Description
private String[]
private boolean
private static final Logger
private Set<String>
private ViewDeclarationLanguageFactory
Inherited from javax.faces.application.ViewHandler:
CHARACTER_ENCODING_KEYDEFAULT_FACELETS_SUFFIXDEFAULT_SUFFIXDEFAULT_SUFFIX_PARAM_NAMEDISABLE_FACELET_JSF_VIEWHANDLER_PARAM_NAMEFACELETS_BUFFER_SIZE_PARAM_NAMEFACELETS_DECORATORS_PARAM_NAMEFACELETS_LIBRARIES_PARAM_NAMEFACELETS_REFRESH_PERIOD_PARAM_NAMEFACELETS_SKIP_COMMENTS_PARAM_NAMEFACELETS_SUFFIX_PARAM_NAMEFACELETS_VIEW_MAPPINGS_PARAM_NAME

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addProtectedView(String
the url-pattern to add.
urlPattern
)

Overrides javax.faces.application.ViewHandler.addProtectedView.

Add the argument urlPattern to the thread safe Set of protected views for this application.

protected void
addViewParameters(FacesContext ctx, String viewId, Map<String, List<String>> existingParameters)

private void
appendOrReplaceExtension(String viewId, String extension, int length, int extensionIndex, StringBuilder buffer)

public Locale
calculateLocale(FacesContext
FacesContext for the current request
context
)

Implements abstract javax.faces.application.ViewHandler.calculateLocale.

This code is currently common to all ViewHandlingStrategy instances.

public String
calculateRenderKitId(FacesContext
FacesContext for the current request
context
)

Implements abstract javax.faces.application.ViewHandler.calculateRenderKitId.

This code is currently common to all ViewHandlingStrategy instances.

protected String

Returns:

the view ID with an altered suffix mapping (if necessary)
convertViewId
(FacesContext context, String
incoming view ID
viewId
)

Adjust the viewID per the requirements of renderView.

public UIViewRoot
createView(FacesContext
the Faces context.
context
,
String
the view id.
viewId
)

Implements abstract javax.faces.application.ViewHandler.createView.

Derive the physical view ID (i.e. the physical resource) and call call ViewDeclarationLanguage#createView(javax.faces.context.FacesContext, String).

public String
deriveLogicalViewId(FacesContext
the FacesContext for this request
context
,
String
the viewId to derive,
requestViewId
)

Overrides javax.faces.application.ViewHandler.deriveLogicalViewId.

Derive and return the viewId from the current request, or the argument input by following the algorithm defined in specification section JSF.7.6.2.

protected String
derivePhysicalViewId(FacesContext ctx, String requestViewId, boolean checkPhysical)

public String
deriveViewId(FacesContext
the FacesContext for this request
context
,
String
the viewId to derive,
requestViewId
)

Overrides javax.faces.application.ViewHandler.deriveViewId.

Derive and return the viewId from the current request, or the argument input by following the algorithm defined in specification section JSF.7.6.2.

protected Locale

Returns:

the Locale based on pref and the matching alogritm specified in JSTL 8.3.2
findMatch
(FacesContext
the FacesContext for the current request
context
,
Locale
the preferred locale
pref
)

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.

public String
getActionURL(FacesContext
FacesContext for this request
context
,
String
View identifier of the desired view
viewId
)

Implements abstract javax.faces.application.ViewHandler.getActionURL.

This code is currently common to all ViewHandlingStrategy instances.

private String
public String
getBookmarkableURL(FacesContext
The FacesContext processing this request
context
,
String
The view identifier of the target page
viewId
,
Map<String, List<String>>
A mapping of parameter names to one or more values
parameters
,
boolean
A flag indicating whether view parameters should be encoded into this URL
includeViewParams
)

Overrides javax.faces.application.ViewHandler.getBookmarkableURL.

Return a JSF action URL derived from the viewId argument that is suitable to be used as the target of a link in a JSF response.

protected Map<String, List<String>>
getFullParameterList(FacesContext ctx, String viewId, Map<String, List<String>> existingParameters)

public Set<String>
getProtectedViewsUnmodifiable()

Overrides javax.faces.application.ViewHandler.getProtectedViewsUnmodifiable.

Return an unmodifiable Set of the protected views currently known to this ViewHandler instance.

public String
getRedirectURL(FacesContext
The FacesContext processing this request
context
,
String
The view identifier of the target page
viewId
,
Map<String, List<String>>
A mapping of parameter names to one or more values
parameters
,
boolean
A flag indicating whether view parameters should be encoded into this URL
includeViewParams
)

Overrides javax.faces.application.ViewHandler.getRedirectURL.

Return a JSF action URL derived from the viewId argument that is suitable to be used by the NavigationHandler to issue a redirect request to the URL using a NonFaces request.

public String
getResourceURL(FacesContext
FacesContext for the current request
context
,
String
Resource path to convert to a URL
path
)

Implements abstract javax.faces.application.ViewHandler.getResourceURL.

This code is currently common to all ViewHandlingStrategy instances.

private static String
public ViewDeclarationLanguage
getViewDeclarationLanguage(FacesContext
the FacesContext for this request.
context
,
String
the logical view id, as returned from deriveLogicalViewId for which the ViewDeclarationLanguage should be returned.
viewId
)

Overrides javax.faces.application.ViewHandler.getViewDeclarationLanguage.

Return the ViewDeclarationLanguage instance used for this ViewHandler instance.

public Stream<String>
getViews(FacesContext
The FacesContext for this request.
context
,
String
The initial path from which to start looking for view ids.
path
,
ViewVisitOption...
The options to influence the traversal. See ViewVisitOption for details on those.
options
)

Overrides javax.faces.application.ViewHandler.getViews.

Return a Stream possibly lazily populated by walking the view trees of every active ViewDeclarationLanguage rooted at a given initial path.

public Stream<String>
getViews(FacesContext
The FacesContext for this request.
context
,
String
The initial path from which to start looking for view ids.
path
,
int
The absolute maximum depth of nested directories to visit counted from the root (/).
maxDepth
,
ViewVisitOption...
The options to influence the traversal. See ViewVisitOption for details on those.
options
)

Overrides javax.faces.application.ViewHandler.getViews.

Return a Stream possibly lazily populated by walking the view trees of every active ViewDeclarationLanguage rooted at a given initial path.

public String
getWebsocketURL(FacesContext
FacesContext for the current request.
context
,
String
The channel name of the websocket.
channel
)

Implements abstract javax.faces.application.ViewHandler.getWebsocketURL.

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.

public void
private String
legacyConvertViewId(String viewId, int length, int extensionIndex, StringBuilder buffer)

protected String

Returns:

the URI without additional FacesServlet mappings
normalizeRequestURI
(String
the servlet request path
uri
,
String
the FacesServlet mapping used for this request
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.

private static boolean
public boolean
removeProtectedView(String
the url-pattern to remove.
urlPattern
)

Overrides javax.faces.application.ViewHandler.removeProtectedView.

Remove the argument urlPattern from the thread safe Set of protected views for this application, if present in the Set.

public void
public UIViewRoot
restoreView(FacesContext
FacesContext for the current request
context
,
String
the view identifier for the current request
viewId
)

Implements abstract javax.faces.application.ViewHandler.restoreView.

Call ViewDeclarationLanguage#restoreView(javax.faces.context.FacesContext, String).

protected void
send404Error(FacesContext
the FacesContext for the current request
context
)

Send HttpServletResponse#SC_NOT_FOUND (404) to the client.

public void
writeState(FacesContext
FacesContext for the current request
context
)

Implements abstract javax.faces.application.ViewHandler.writeState.

This code is currently common to all ViewHandlingStrategy instances.

Inherited from javax.faces.application.ViewHandler:
calculateCharacterEncoding

Field Detail

configuredExtensionsback to summary
private String[] configuredExtensions
extensionsSetback to summary
private boolean extensionsSet
LOGGERback to summary
private static final Logger LOGGER
protectedViewsback to summary
private Set<String> protectedViews
vdlFactoryback to summary
private ViewDeclarationLanguageFactory vdlFactory

Constructor Detail

MultiViewHandlerback to summary
public MultiViewHandler()

Method Detail

addProtectedViewback to summary
public void addProtectedView(String urlPattern)

Overrides javax.faces.application.ViewHandler.addProtectedView.

Doc from javax.faces.application.ViewHandler.addProtectedView.

Add the argument urlPattern to the thread safe Set of protected views for this application. Compliant implementations make it so a subsequent call to getProtectedViewsUnmodifiable contains the argument. The runtime must support calling this method at any time after application startup. The default implementation takes no action.

Parameters
urlPattern:String

the url-pattern to add.

Annotations
@Override
addViewParametersback to summary
protected void addViewParameters(FacesContext ctx, String viewId, Map<String, List<String>> existingParameters)
appendOrReplaceExtensionback to summary
private void appendOrReplaceExtension(String viewId, String extension, int length, int extensionIndex, StringBuilder buffer)
calculateLocaleback to summary
public Locale calculateLocale(FacesContext context)

Implements abstract javax.faces.application.ViewHandler.calculateLocale.

This code is currently common to all ViewHandlingStrategy instances.

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.calculateLocale.

FacesContext for the current request

Returns:Locale

Doc from javax.faces.application.ViewHandler.calculateLocale.

the locale.

Annotations
@Override
See Also
ViewHandler#calculateLocale(javax.faces.context.FacesContext)
calculateRenderKitIdback to summary
public String calculateRenderKitId(FacesContext context)

Implements abstract javax.faces.application.ViewHandler.calculateRenderKitId.

This code is currently common to all ViewHandlingStrategy instances.

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.calculateRenderKitId.

FacesContext for the current request

Returns:String

Doc from javax.faces.application.ViewHandler.calculateRenderKitId.

the render kit id.

Annotations
@Override
See Also
ViewHandler#calculateRenderKitId(javax.faces.context.FacesContext)
convertViewIdback to summary
protected String convertViewId(FacesContext context, String viewId)

Adjust the viewID per the requirements of renderView.

Parameters
context:FacesContext

current javax.faces.context.FacesContext

viewId:String

incoming view ID

Returns:String

the view ID with an altered suffix mapping (if necessary)

createViewback to summary
public UIViewRoot createView(FacesContext context, String viewId)

Implements abstract javax.faces.application.ViewHandler.createView.

Derive the physical view ID (i.e. the physical resource) and call call ViewDeclarationLanguage#createView(javax.faces.context.FacesContext, String).

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.createView.

the Faces context.

viewId:String

Doc from javax.faces.application.ViewHandler.createView.

the view id.

Returns:UIViewRoot

Doc from javax.faces.application.ViewHandler.createView.

the viewroot.

Annotations
@Override
See Also
ViewHandler#restoreView(javax.faces.context.FacesContext, String)
deriveLogicalViewIdback to summary
public String deriveLogicalViewId(FacesContext context, String requestViewId)

Overrides javax.faces.application.ViewHandler.deriveLogicalViewId.

Doc from javax.faces.application.ViewHandler.deriveLogicalViewId.

Derive and return the viewId from the current request, or the argument input by following the algorithm defined in specification section JSF.7.6.2. Note that unlike deriveViewId(), this method does not require that a physical view be present.

This method should work correctly when the FacesServlet is invoked via either a path mapping, extension mapping or an exact match (mapping) as defined by Servlet.12.2. Note that path mapping is also commonly known as prefix mapping (e.g. "/faces/*") and extension mapping as suffix mapping (e.g. "*.xhtml"). An exact match is possible where there's a servlet mapping with an exact URL pattern such as "/foo".

The default implementation of this method simply returns requestViewId unchanged.

Parameters
context:FacesContext

the FacesContext for this request

requestViewId:String

the viewId to derive,

Returns:String

the derived logical view id.

Annotations
@Override
derivePhysicalViewIdback to summary
protected String derivePhysicalViewId(FacesContext ctx, String requestViewId, boolean checkPhysical)
deriveViewIdback to summary
public String deriveViewId(FacesContext context, String requestViewId)

Overrides javax.faces.application.ViewHandler.deriveViewId.

Doc from javax.faces.application.ViewHandler.deriveViewId.

Derive and return the viewId from the current request, or the argument input by following the algorithm defined in specification section JSF.7.6.2.

This method should work correctly when the FacesServlet is invoked via either a path mapping, extension mapping or an exact match (mapping) as defined by Servlet.12.2. Note that path mapping is also commonly known as prefix mapping (e.g. "/faces/*") and extension mapping as suffix mapping (e.g. "*.xhtml"). An exact match is possible where there's a servlet mapping with an exact URL pattern such as "/foo".

The default implementation of this method simply returns requestViewId unchanged.

Parameters
context:FacesContext

the FacesContext for this request

requestViewId:String

the viewId to derive,

Returns:String

the derived view id.

Annotations
@Override
findMatchback to summary
protected Locale findMatch(FacesContext context, Locale pref)

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.

Parameters
context:FacesContext

the FacesContext for the current request

pref:Locale

the preferred locale

Returns:Locale

the Locale based on pref and the matching alogritm specified in JSTL 8.3.2

getActionURLback to summary
public String getActionURL(FacesContext context, String viewId)

Implements abstract javax.faces.application.ViewHandler.getActionURL.

This code is currently common to all ViewHandlingStrategy instances.

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.getActionURL.

FacesContext for this request

viewId:String

Doc from javax.faces.application.ViewHandler.getActionURL.

View identifier of the desired view

Returns:String

Doc from javax.faces.application.ViewHandler.getActionURL.

the action url.

Annotations
@Override
See Also
ViewHandler#getActionURL(javax.faces.context.FacesContext, String)
getActionURLWithoutViewProtectionback to summary
private String getActionURLWithoutViewProtection(FacesContext context, String viewId)
getBookmarkableURLback to summary
public String getBookmarkableURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams)

Overrides javax.faces.application.ViewHandler.getBookmarkableURL.

Doc from javax.faces.application.ViewHandler.getBookmarkableURL.

Return a JSF action URL derived from the viewId argument that is suitable to be used as the target of a link in a JSF response. Compiliant implementations must implement this method as specified in section JSF.7.6.2. The default implementation simply calls through to getActionURL, passing the arguments context and viewId.

Parameters
context:FacesContext

The FacesContext processing this request

viewId:String

The view identifier of the target page

parameters:Map<String, List<String>>

A mapping of parameter names to one or more values

includeViewParams:boolean

A flag indicating whether view parameters should be encoded into this URL

Returns:String

the bookmarkable URL.

Annotations
@Override
getFullParameterListback to summary
protected Map<String, List<String>> getFullParameterList(FacesContext ctx, String viewId, Map<String, List<String>> existingParameters)
getProtectedViewsUnmodifiableback to summary
public Set<String> getProtectedViewsUnmodifiable()

Overrides javax.faces.application.ViewHandler.getProtectedViewsUnmodifiable.

Doc from javax.faces.application.ViewHandler.getProtectedViewsUnmodifiable.

Return an unmodifiable Set of the protected views currently known to this ViewHandler instance. Compliant implementations must return a Set that is the concatenation of the contents of all the <url-pattern> elements within all the <protected-views> in all of the application configuration resources in the current application. The runtime must support calling this method at any time after application startup. The default implementation returns an unmodifiable empty Set.

Returns:Set<String>

the unmodifiable set of protected views.

Annotations
@Override
getRedirectURLback to summary
public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams)

Overrides javax.faces.application.ViewHandler.getRedirectURL.

Doc from javax.faces.application.ViewHandler.getRedirectURL.

Return a JSF action URL derived from the viewId argument that is suitable to be used by the NavigationHandler to issue a redirect request to the URL using a NonFaces request. Compliant implementations must implement this method as specified in section JSF.7.6.2. The default implementation simply calls through to getActionURL, passing the arguments context and viewId.

Parameters
context:FacesContext

The FacesContext processing this request

viewId:String

The view identifier of the target page

parameters:Map<String, List<String>>

A mapping of parameter names to one or more values

includeViewParams:boolean

A flag indicating whether view parameters should be encoded into this URL

Returns:String

the redirect URL.

Annotations
@Override
See Also
ViewHandler#getRedirectURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
getResourceURLback to summary
public String getResourceURL(FacesContext context, String path)

Implements abstract javax.faces.application.ViewHandler.getResourceURL.

This code is currently common to all ViewHandlingStrategy instances.

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.getResourceURL.

FacesContext for the current request

path:String

Doc from javax.faces.application.ViewHandler.getResourceURL.

Resource path to convert to a URL

Returns:String

Doc from javax.faces.application.ViewHandler.getResourceURL.

the resource URL.

Annotations
@Override
See Also
ViewHandler#getResourceURL(javax.faces.context.FacesContext, String)
getStringValueToTransferback to summary
private static String getStringValueToTransfer(FacesContext context, UIViewParameter param, Collection<UIViewParameter> viewParams)
getViewDeclarationLanguageback to summary
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId)

Overrides javax.faces.application.ViewHandler.getViewDeclarationLanguage.

Doc from javax.faces.application.ViewHandler.getViewDeclarationLanguage.

Return the ViewDeclarationLanguage instance used for this ViewHandler instance.

The default implementation must use javax.faces.view.ViewDeclarationLanguageFactory#getViewDeclarationLanguage to obtain the appropriate ViewDeclarationLanguage implementation for the argument viewId. Any exceptions thrown as a result of invoking that method must not be swallowed.

The default implementation of this method returns null.

Parameters
context:FacesContext

the FacesContext for this request.

viewId:String

the logical view id, as returned from deriveLogicalViewId for which the ViewDeclarationLanguage should be returned.

Returns:ViewDeclarationLanguage

the ViewDeclarationLanguage, or null.

Annotations
@Override
See Also
ViewHandler#getViewDeclarationLanguage(javax.faces.context.FacesContext, String)
getViewsback to summary
public Stream<String> getViews(FacesContext context, String path, ViewVisitOption... options)

Overrides javax.faces.application.ViewHandler.getViews.

Doc from javax.faces.application.ViewHandler.getViews.

Return a Stream possibly lazily populated by walking the view trees of every active ViewDeclarationLanguage rooted at a given initial path. The view tree of every ViewDeclarationLanguage is individually traversed breadth-first as per the contract of ViewDeclarationLanguage#getViews(FacesContext, String, int, ViewVisitOption...). The elements in the stream are logical view ids.

This method works as if invoking it were equivalent to evaluating the expression:

getViews(facesContext, start, Integer.MAX_VALUE, options)
Put differently, it visits all levels of the view tree.

In case more than one active ViewDeclarationLanguage is present, the order in which view ids from each ViewDeclarationLanguage appear in the stream is undetermined, except for the guarantee that every individual ViewDeclarationLanguage is traversed breadth-first.

Parameters
context:FacesContext

The FacesContext for this request.

path:String

The initial path from which to start looking for view ids.

options:ViewVisitOption[]

The options to influence the traversal. See ViewVisitOption for details on those.

Returns:Stream<String>

the Stream of view ids

Annotations
@Override
getViewsback to summary
public Stream<String> getViews(FacesContext context, String path, int maxDepth, ViewVisitOption... options)

Overrides javax.faces.application.ViewHandler.getViews.

Doc from javax.faces.application.ViewHandler.getViews.

Return a Stream possibly lazily populated by walking the view trees of every active ViewDeclarationLanguage rooted at a given initial path. The view tree of every ViewDeclarationLanguage is individually traversed breadth-first as per the contract of ViewDeclarationLanguage#getViews(FacesContext, String, int, ViewVisitOption...). The elements in the stream are logical view ids.

The maxDepth parameter is the maximum depth of directory levels to visit for each ViewDeclarationLanguage beyond the initial path, which is always visited. The value is relative to the root (/), not to the given initial path. E.g. given maxDepth = 3 and initial path /foo/, visiting will proceed up to /foo/bar/, where / counts as depth 1, /foo/ as depth 2 and /foo/bar/ as depth 3. A value lower or equal to the depth of the initial path means that only the initial path is visited. A value of MAX_VALUE may be used to indicate that all levels should be visited.

In case more than one active ViewDeclarationLanguage is present, the order in which view ids from each ViewDeclarationLanguage appear in the stream is undetermined, except for the guarantee that every individual ViewDeclarationLanguage is traversed breadth-first.

Parameters
context:FacesContext

The FacesContext for this request.

path:String

The initial path from which to start looking for view ids.

maxDepth:int

The absolute maximum depth of nested directories to visit counted from the root (/).

options:ViewVisitOption[]

The options to influence the traversal. See ViewVisitOption for details on those.

Returns:Stream<String>

the Stream of view ids

Annotations
@Override
getWebsocketURLback to summary
public String getWebsocketURL(FacesContext context, String channel)

Implements abstract javax.faces.application.ViewHandler.getWebsocketURL.

Doc from javax.faces.application.ViewHandler.getWebsocketURL.

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.

Parameters
context:FacesContext

FacesContext for the current request.

channel:String

The channel name of the websocket.

Returns:String

the websocket URL.

Annotations
@Override
initViewback to summary
public void initView(FacesContext context) throws FacesException

Overrides javax.faces.application.ViewHandler.initView.

Call the default implementation of javax.faces.application.ViewHandler#initView(javax.faces.context.FacesContext)

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.initView.

the Faces context.

Annotations
@Override
Exceptions
FacesException:

Doc from javax.faces.application.ViewHandler.initView.

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.

See Also
javax.faces.application.ViewHandler#initView(javax.faces.context.FacesContext)
legacyConvertViewIdback to summary
private String legacyConvertViewId(String viewId, int length, int extensionIndex, StringBuilder buffer)
normalizeRequestURIback to summary
protected String normalizeRequestURI(String uri, 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.

Parameters
uri:String

the servlet request path

mapping:String

the FacesServlet mapping used for this request

Returns:String

the URI without additional FacesServlet mappings

Since
1.2
paramHasValueExpressionback to summary
private static boolean paramHasValueExpression(UIViewParameter param)
removeProtectedViewback to summary
public boolean removeProtectedView(String urlPattern)

Overrides javax.faces.application.ViewHandler.removeProtectedView.

Doc from javax.faces.application.ViewHandler.removeProtectedView.

Remove the argument urlPattern from the thread safe Set of protected views for this application, if present in the Set. If the argument urlPattern is not present in the Set, this method has no effect. Compliant implementations must make it so a subsequent call to getProtectedViewsUnmodifiable does not contain the argument. The runtime must support calling this method at any time after application startup. Returns true if this Set contained the argument. The default implementation takes no action and returns false.

Parameters
urlPattern:String

the url-pattern to remove.

Returns:boolean

true if in the Set, false otherwise.

Annotations
@Override
renderViewback to summary
public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException

Implements abstract javax.faces.application.ViewHandler.renderView.

Call ViewDeclarationLanguage#renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot) if the view can be rendered.

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.renderView.

FacesContext for the current request

viewToRender:UIViewRoot

Doc from javax.faces.application.ViewHandler.renderView.

the view to render

Annotations
@Override
Exceptions
IOException:

Doc from javax.faces.application.ViewHandler.renderView.

if an input/output error occurs

FacesException:

Doc from javax.faces.application.ViewHandler.renderView.

if a servlet error occurs

See Also
ViewHandler#renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
restoreViewback to summary
public UIViewRoot restoreView(FacesContext context, String viewId)

Implements abstract javax.faces.application.ViewHandler.restoreView.

Call ViewDeclarationLanguage#restoreView(javax.faces.context.FacesContext, String).

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.restoreView.

FacesContext for the current request

viewId:String

Doc from javax.faces.application.ViewHandler.restoreView.

the view identifier for the current request

Returns:UIViewRoot

Doc from javax.faces.application.ViewHandler.restoreView.

the restored view root, or null.

Annotations
@Override
See Also
ViewHandler#restoreView(javax.faces.context.FacesContext, String)
send404Errorback to summary
protected void send404Error(FacesContext context)

Send HttpServletResponse#SC_NOT_FOUND (404) to the client.

Parameters
context:FacesContext

the FacesContext for the current request

writeStateback to summary
public void writeState(FacesContext context) throws IOException

Implements abstract javax.faces.application.ViewHandler.writeState.

This code is currently common to all ViewHandlingStrategy instances.

Parameters
context:FacesContext

Doc from javax.faces.application.ViewHandler.writeState.

FacesContext for the current request

Annotations
@Override
Exceptions
IOException:

Doc from javax.faces.application.ViewHandler.writeState.

if an input/output error occurs

See Also
ViewHandler#writeState(javax.faces.context.FacesContext)