ViewHandler implementation handles both JSP-based and
Facelets/PDL-based views.
| Modifier and Type | Field and Description |
|---|---|
| private String[] | |
| private boolean | |
| private static final Logger | |
| private Set | |
| private ViewDeclarationLanguageFactory |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addProtectedView(String
the url-pattern to add. urlPattern)Overrides javax.
Add the argument |
| protected void | |
| private void | appendOrReplaceExtension(String viewId, String extension, int length, int extensionIndex, StringBuilder buffer)
|
| public Locale | calculateLocale(FacesContext
FacesContext for the current requestImplements abstract javax.
This code is currently common to all |
| public String | calculateRenderKitId(FacesContext
FacesContext for the current requestImplements abstract javax.
This code is currently common to all |
| protected String | Returns: the view ID with an altered suffix mapping (if necessary)current context, String javax.faces.context.FacesContextincoming view ID viewId)Adjust the viewID per the requirements of |
| public UIViewRoot | createView(FacesContext
the Faces context. context, String the view id. viewId)Implements abstract javax.
Derive the physical view ID (i.e. the physical resource) and call
call |
| public String | deriveLogicalViewId(FacesContext
the context, String FacesContext for this requestthe requestViewId)viewId to derive,Overrides javax. 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 | |
| public String | deriveViewId(FacesContext
the context, String FacesContext for this requestthe requestViewId)viewId to derive,Overrides javax. 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.2the context, Locale FacesContext for the current requestthe preferred locale pref)Attempts to find a matching locale based on |
| public String | getActionURL(FacesContext
FacesContext for this requestView identifier of the desired view viewId)Implements abstract javax.
This code is currently common to all |
| 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. 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 | |
| public Set | getProtectedViewsUnmodifiable()
Overrides javax.
Return an unmodifiable |
| 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.
Return a JSF action URL derived from the |
| public String | getResourceURL(FacesContext
FacesContext for the current requestResource path to convert to a URL path)Implements abstract javax.
This code is currently common to all |
| private static String | getStringValueToTransfer(FacesContext context, UIViewParameter param, Collection<UIViewParameter> viewParams)
|
| public ViewDeclarationLanguage | getViewDeclarationLanguage(FacesContext
the context, String FacesContext for this request.the logical view id, as returned from
viewId)deriveLogicalViewId for which the ViewDeclarationLanguage
should be returned.Overrides javax.
Return the |
| public Stream | getViews(FacesContext
The context, String FacesContext for this request.The initial path from which to start looking for view ids. path, ViewVisitOption... The options to influence the traversal. See options)ViewVisitOption for
details on those.Overrides javax.
Return a |
| public Stream | getViews(FacesContext
The context, String FacesContext for this request.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 options)ViewVisitOption for
details on those.Overrides javax.
Return a |
| public String | getWebsocketURL(FacesContext
FacesContext for the current request.The channel name of the websocket. channel)Implements abstract javax.
If the value returned from this method is used as the |
| public void | initView(FacesContext
the Faces context. context)Overrides javax. javax.faces.application.ViewHandler#initView(javax.faces.context.FacesContext)
|
| private String | |
| protected String | Returns: the URI without additional FacesServlet mappingsthe 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 |
| private static boolean | |
| public boolean | removeProtectedView(String
the url-pattern to remove. urlPattern)Overrides javax.
Remove the argument |
| public void | renderView(FacesContext
FacesContext for the current requestthe view to render viewToRender)Implements abstract javax.
Call |
| public UIViewRoot | restoreView(FacesContext
FacesContext for the current requestthe view identifier for the current request viewId)Implements abstract javax.
Call |
| protected void | send404Error(FacesContext
the context)FacesContext for the current request
Send |
| public void | writeState(FacesContext
FacesContext for the current requestImplements abstract javax.
This code is currently common to all |
| configuredExtensions | back to summary |
|---|---|
| private String[] configuredExtensions | |
| extensionsSet | back to summary |
|---|---|
| private boolean extensionsSet | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| protectedViews | back to summary |
|---|---|
| private Set<String> protectedViews | |
| vdlFactory | back to summary |
|---|---|
| private ViewDeclarationLanguageFactory vdlFactory | |
| MultiViewHandler | back to summary |
|---|---|
| public MultiViewHandler() | |
| addProtectedView | back to summary |
|---|---|
| public void addProtectedView(String urlPattern) Overrides javax. Doc from javax.
Add the argument | |
| addViewParameters | back to summary |
|---|---|
| protected void addViewParameters(FacesContext ctx, String viewId, Map<String, List<String>> existingParameters) | |
| appendOrReplaceExtension | back to summary |
|---|---|
| private void appendOrReplaceExtension(String viewId, String extension, int length, int extensionIndex, StringBuilder buffer) | |
| calculateLocale | back to summary |
|---|---|
| public Locale calculateLocale(FacesContext context) Implements abstract javax.
This code is currently common to all
| |
| calculateRenderKitId | back to summary |
|---|---|
| public String calculateRenderKitId(FacesContext context) Implements abstract javax.
This code is currently common to all
| |
| convertViewId | back to summary |
|---|---|
| protected String convertViewId(FacesContext context, String viewId) Adjust the viewID per the requirements of
| |
| createView | back to summary |
|---|---|
| public UIViewRoot createView(FacesContext context, String viewId) Implements abstract javax.
Derive the physical view ID (i.e. the physical resource) and call
call
| |
| deriveLogicalViewId | back to summary |
|---|---|
| public String deriveLogicalViewId(FacesContext context, String requestViewId) Overrides javax. Doc from javax.
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
This method should work correctly when the FacesServlet is invoked via either a
The default implementation of this method simply returns requestViewId unchanged.
| |
| derivePhysicalViewId | back to summary |
|---|---|
| protected String derivePhysicalViewId(FacesContext ctx, String requestViewId, boolean checkPhysical) | |
| deriveViewId | back to summary |
|---|---|
| public String deriveViewId(FacesContext context, String requestViewId) Overrides javax. Doc from javax. 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
The default implementation of this method simply returns requestViewId unchanged.
| |
| findMatch | back to summary |
|---|---|
| protected Locale findMatch(FacesContext context, Locale pref) Attempts to find a matching locale based on
| |
| getActionURL | back to summary |
|---|---|
| public String getActionURL(FacesContext context, String viewId) Implements abstract javax.
This code is currently common to all
| |
| getActionURLWithoutViewProtection | back to summary |
|---|---|
| private String getActionURLWithoutViewProtection(FacesContext context, String viewId) | |
| getBookmarkableURL | back to summary |
|---|---|
| public String getBookmarkableURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) Overrides javax. Doc from javax.
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
| |
| getFullParameterList | back to summary |
|---|---|
| protected Map | |
| getProtectedViewsUnmodifiable | back to summary |
|---|---|
| public Set Overrides javax. Doc from javax.
Return an unmodifiable | |
| getRedirectURL | back to summary |
|---|---|
| public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) Overrides javax. Doc from javax.
Return a JSF action URL derived from the
| |
| getResourceURL | back to summary |
|---|---|
| public String getResourceURL(FacesContext context, String path) Implements abstract javax.
This code is currently common to all
| |
| getStringValueToTransfer | back to summary |
|---|---|
| private static String getStringValueToTransfer(FacesContext context, UIViewParameter param, Collection<UIViewParameter> viewParams) | |
| getViewDeclarationLanguage | back to summary |
|---|---|
| public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) Overrides javax. Doc from javax.
Return the
The default implementation must use
The default implementation of this method returns null.
| |
| getViews | back to summary |
|---|---|
| public Stream Overrides javax. Doc from javax.
Return a This method works as if invoking it were equivalent to evaluating the expression: Put differently, it visits all levels of the view tree.getViews(facesContext, start, Integer.MAX_VALUE, options)
In case more than one active
| |
| getViews | back to summary |
|---|---|
| public Stream Overrides javax. Doc from javax.
Return a
The
In case more than one active
| |
| getWebsocketURL | back to summary |
|---|---|
| public String getWebsocketURL(FacesContext context, String channel) Implements abstract javax. Doc from javax.
If the value returned from this method is used as the
| |
| initView | back to summary |
|---|---|
| public void initView(FacesContext context) throws FacesException Overrides javax. Call the default implementation of
| |
| legacyConvertViewId | back to summary |
|---|---|
| private String legacyConvertViewId(String viewId, int length, int extensionIndex, StringBuilder buffer) | |
| normalizeRequestURI | back 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 | |
| paramHasValueExpression | back to summary |
|---|---|
| private static boolean paramHasValueExpression(UIViewParameter param) | |
| removeProtectedView | back to summary |
|---|---|
| public boolean removeProtectedView(String urlPattern) Overrides javax. Doc from javax.
Remove the argument | |
| renderView | back to summary |
|---|---|
| public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException Implements abstract javax.
Call
| |
| restoreView | back to summary |
|---|---|
| public UIViewRoot restoreView(FacesContext context, String viewId) Implements abstract javax.
Call
| |
| send404Error | back to summary |
|---|---|
| protected void send404Error(FacesContext context)
Send
| |
| writeState | back to summary |
|---|---|
| public void writeState(FacesContext context) throws IOException Implements abstract javax.
This code is currently common to all
| |