ViewHandler implementation handles the Facelets VDL-based views.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private static final Logger | |
| private final Set | |
| private final ViewDeclarationLanguageFactory |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addProtectedView(String
the url-pattern to add. urlPattern)Overrides jakarta.
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 jakarta.
This code is currently common to all |
| public String | calculateRenderKitId(FacesContext
FacesContext for the current requestImplements abstract jakarta.
This code is currently common to all |
| protected String | Returns: the view ID with an altered suffix mapping (if necessary)incoming 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 jakarta.
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 jakarta. Derive and return the viewId from the current request, or the argument input by following the algorithm defined in section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document. |
| protected String | |
| public String | deriveViewId(FacesContext
the context, String FacesContext for this requestthe requestViewId)viewId to derive,Overrides jakarta. Derive and return the viewId from the current request, or the argument input by following the algorithm defined in section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document. |
| 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 jakarta.
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 jakarta. Return a Jakarta Faces action URL derived from the viewId argument that is suitable to be used as the target of a link in a Jakarta Faces response. |
| protected Map | |
| public Set | getProtectedViewsUnmodifiable()
Overrides jakarta.
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 jakarta.
Return a Jakarta Faces action URL derived from the |
| public String | getResourceURL(FacesContext
FacesContext for the current requestResource path to convert to a URL path)Implements abstract jakarta.
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 jakarta.
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 jakarta.
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 jakarta.
Return a |
| public String | getWebsocketURL(FacesContext
FacesContext for the current request.The channel name of the websocket. channel)Implements abstract jakarta.
If the value returned from this method is used as the |
| public void | initView(FacesContext
the Faces context. context)Overrides jakarta. Call the default implementation of
|
| protected String | Returns: the viewId without additional prefix FacesServlet mappingssomething resembling a view id, can come from the request or from the navigation handler. viewId, String the FacesServlet mapping used for this request with the "/*" removed, e.g. /faces instead of /faces/* mapping)
If the specified mapping is a prefix mapping, and the provided request URI (sometimes the value from
|
| private static boolean | |
| public boolean | removeProtectedView(String
the url-pattern to remove. urlPattern)Overrides jakarta.
Remove the argument |
| public void | renderView(FacesContext
FacesContext for the current requestthe view to render viewToRender)Implements abstract jakarta.
Call
|
| public UIViewRoot | restoreView(FacesContext
FacesContext for the current requestthe view identifier for the current request viewId)Implements abstract jakarta.
Call |
| protected void | send404Error(FacesContext
the context)FacesContext for the current request
Send |
| public void | writeState(FacesContext
FacesContext for the current requestImplements abstract jakarta.
This code is currently common to all |
| configuredExtensions | back to summary |
|---|---|
| private final List<String> configuredExtensions | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| protectedViews | back to summary |
|---|---|
| private final Set<String> protectedViews | |
| vdlFactory | back to summary |
|---|---|
| private final ViewDeclarationLanguageFactory vdlFactory | |
| MultiViewHandler | back to summary |
|---|---|
| public MultiViewHandler() | |
| addProtectedView | back to summary |
|---|---|
| public void addProtectedView(String urlPattern) Overrides jakarta. Doc from jakarta.
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 jakarta.
This code is currently common to all
| |
| calculateRenderKitId | back to summary |
|---|---|
| public String calculateRenderKitId(FacesContext context) Implements abstract jakarta.
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 jakarta.
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 jakarta. Doc from jakarta.
Derive and return the viewId from the current request, or the argument input by following the algorithm defined in
section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document.
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 jakarta. Doc from jakarta. Derive and return the viewId from the current request, or the argument input by following the algorithm defined in section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document.
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 jakarta.
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 jakarta. Doc from jakarta.
Return a Jakarta Faces action URL derived from the viewId argument that is suitable to be used as the target
of a link in a Jakarta Faces response. Compliant implementations must implement this method as specified in
section 7.6.2 "Default ViewHandler Implementation" of the Jakarta Faces Specification Document.
The default implementation simply calls through to
| |
| getFullParameterList | back to summary |
|---|---|
| protected Map | |
| getProtectedViewsUnmodifiable | back to summary |
|---|---|
| public Set Overrides jakarta. Doc from jakarta.
Return an unmodifiable | |
| getRedirectURL | back to summary |
|---|---|
| public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) Overrides jakarta. Doc from jakarta.
Return a Jakarta Faces action URL derived from the
| |
| getResourceURL | back to summary |
|---|---|
| public String getResourceURL(FacesContext context, String path) Implements abstract jakarta.
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 jakarta. Doc from jakarta.
Return the
The default implementation must use
The default implementation of this method returns null.
| |
| getViews | back to summary |
|---|---|
| public Stream Overrides jakarta. Doc from jakarta.
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 jakarta. Doc from jakarta.
Return a
The
In case more than one active
| |
| getWebsocketURL | back to summary |
|---|---|
| public String getWebsocketURL(FacesContext context, String channel) Implements abstract jakarta. Doc from jakarta.
If the value returned from this method is used as the
| |
| initView | back to summary |
|---|---|
| public void initView(FacesContext context) throws FacesException Overrides jakarta. Call the default implementation of
| |
| normalizeRequestURI | back to summary |
|---|---|
| protected String normalizeRequestURI(String viewId, String mapping)
If the specified mapping is a prefix mapping, and the provided request URI (sometimes the value from
| |
| paramHasValueExpression | back to summary |
|---|---|
| private static boolean paramHasValueExpression(UIViewParameter param) | |
| removeProtectedView | back to summary |
|---|---|
| public boolean removeProtectedView(String urlPattern) Overrides jakarta. Doc from jakarta.
Remove the argument | |
| renderView | back to summary |
|---|---|
| public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException Implements abstract jakarta.
Call
| |
| restoreView | back to summary |
|---|---|
| public UIViewRoot restoreView(FacesContext context, String viewId) Implements abstract jakarta.
Call
| |
| send404Error | back to summary |
|---|---|
| protected void send404Error(FacesContext context)
Send
| |
| writeState | back to summary |
|---|---|
| public void writeState(FacesContext context) throws IOException Implements abstract jakarta.
This code is currently common to all
| |