Class ViewHandlerWrapper
- All Implemented Interfaces:
FacesWrapper<ViewHandler>
Provides a simple implementation of ViewHandler
that can
be subclassed by developers wishing to provide specialized behavior
to an existing ViewHandler
instance. The default
implementation of all methods is to call through to the wrapped
ViewHandler
.
Usage: extend this class and override getWrapped()
to
return the instance we are wrapping.
- Since:
- 1.2
-
Field Summary
Fields inherited from class javax.faces.application.ViewHandler
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProtectedView
(String urlPattern) The default behavior of this method is to callViewHandler.addProtectedView(java.lang.String)
on the wrappedViewHandler
object.calculateCharacterEncoding
(FacesContext context) The default behavior of this method is to callViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.calculateLocale
(FacesContext context) The default behavior of this method is to callViewHandler.calculateLocale(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.calculateRenderKitId
(FacesContext context) The default behavior of this method is to callViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.createView
(FacesContext context, String viewId) The default behavior of this method is to callViewHandler.createView(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.deriveLogicalViewId
(FacesContext context, String input) The default behavior of this method is to callViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.deriveViewId
(FacesContext context, String input) The default behavior of this method is to callViewHandler.deriveViewId(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.getActionURL
(FacesContext context, String viewId) The default behavior of this method is to callViewHandler.getActionURL(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.getBookmarkableURL
(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) The default behavior of this method is to callViewHandler.getBookmarkableURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
on the wrappedViewHandler
object.The default behavior of this method is to callViewHandler.getProtectedViewsUnmodifiable()
on the wrappedViewHandler
object.getRedirectURL
(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) The default behavior of this method is to callViewHandler.getRedirectURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
on the wrappedViewHandler
object.getResourceURL
(FacesContext context, String path) The default behavior of this method is to callViewHandler.getResourceURL(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.getViewDeclarationLanguage
(FacesContext context, String viewId) The default behavior of this method is to callViewHandler.getViewDeclarationLanguage(javax.faces.context.FacesContext, java.lang.String)
on the wrappedViewHandler
object.abstract ViewHandler
A class that implements this interface uses this method to return an instance of the class being wrapped.void
initView
(FacesContext context) The default behavior of this method is to callViewHandler.initView(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.boolean
removeProtectedView
(String urlPattern) The default behavior of this method is to callViewHandler.removeProtectedView(java.lang.String)
on the wrappedViewHandler
object.void
renderView
(FacesContext context, UIViewRoot viewToRender) The default behavior of this method is to callViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
on the wrappedViewHandler
object.restoreView
(FacesContext context, String viewId) The default behavior of this method is to callViewHandler.restoreView(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.void
writeState
(FacesContext context) The default behavior of this method is to callViewHandler.writeState(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.
-
Constructor Details
-
ViewHandlerWrapper
public ViewHandlerWrapper()
-
-
Method Details
-
getWrapped
Description copied from interface:FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrapped
in interfaceFacesWrapper<ViewHandler>
- Returns:
- the instance that we are wrapping.
-
calculateCharacterEncoding
The default behavior of this method is to call
ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.- Overrides:
calculateCharacterEncoding
in classViewHandler
- Since:
- 1.2
- See Also:
-
calculateLocale
The default behavior of this method is to call
ViewHandler.calculateLocale(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.- Specified by:
calculateLocale
in classViewHandler
- Parameters:
context
-FacesContext
for the current request- Since:
- 1.2
- See Also:
-
deriveViewId
The default behavior of this method is to call
ViewHandler.deriveViewId(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.- Overrides:
deriveViewId
in classViewHandler
- Parameters:
context
- theFacesContext
for this requestinput
- theviewId
to derive,- Since:
- 2.0
- See Also:
-
deriveLogicalViewId
The default behavior of this method is to call
ViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.- Overrides:
deriveLogicalViewId
in classViewHandler
- Parameters:
context
- theFacesContext
for this requestinput
- theviewId
to derive,- Since:
- 2.1
- See Also:
-
calculateRenderKitId
The default behavior of this method is to call
ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.- Specified by:
calculateRenderKitId
in classViewHandler
- Parameters:
context
-FacesContext
for the current request- Since:
- 1.2
- See Also:
-
createView
The default behavior of this method is to call
ViewHandler.createView(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.- Specified by:
createView
in classViewHandler
- Since:
- 1.2
- See Also:
-
getActionURL
The default behavior of this method is to call
ViewHandler.getActionURL(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.- Specified by:
getActionURL
in classViewHandler
- Parameters:
context
-FacesContext
for this requestviewId
- View identifier of the desired view- Since:
- 1.2
- See Also:
-
getProtectedViewsUnmodifiable
The default behavior of this method is to call
ViewHandler.getProtectedViewsUnmodifiable()
on the wrappedViewHandler
object.- Overrides:
getProtectedViewsUnmodifiable
in classViewHandler
- Since:
- 2.2
- See Also:
-
addProtectedView
The default behavior of this method is to call
ViewHandler.addProtectedView(java.lang.String)
on the wrappedViewHandler
object.- Overrides:
addProtectedView
in classViewHandler
- Parameters:
urlPattern
- the url-pattern to add.- Since:
- 2.2
- See Also:
-
removeProtectedView
The default behavior of this method is to call
ViewHandler.removeProtectedView(java.lang.String)
on the wrappedViewHandler
object.- Overrides:
removeProtectedView
in classViewHandler
- Parameters:
urlPattern
- the url-pattern to remove.- Since:
- 2.2
- See Also:
-
getRedirectURL
public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) The default behavior of this method is to call
ViewHandler.getRedirectURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
on the wrappedViewHandler
object.- Overrides:
getRedirectURL
in classViewHandler
- Parameters:
context
- The FacesContext processing this requestviewId
- The view identifier of the target pageparameters
- A mapping of parameter names to one or more valuesincludeViewParams
- A flag indicating whether view parameters should be encoded into this URL- Since:
- 2.0
- See Also:
-
getBookmarkableURL
public String getBookmarkableURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) The default behavior of this method is to call
ViewHandler.getBookmarkableURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
on the wrappedViewHandler
object.- Overrides:
getBookmarkableURL
in classViewHandler
- Parameters:
context
- The FacesContext processing this requestviewId
- The view identifier of the target pageparameters
- A mapping of parameter names to one or more valuesincludeViewParams
- A flag indicating whether view parameters should be encoded into this URL- Since:
- 2.0
- See Also:
-
getResourceURL
The default behavior of this method is to call
ViewHandler.getResourceURL(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.- Specified by:
getResourceURL
in classViewHandler
- Parameters:
context
-FacesContext
for the current requestpath
- Resource path to convert to a URL- Since:
- 1.2
- See Also:
-
getViewDeclarationLanguage
The default behavior of this method is to call
ViewHandler.getViewDeclarationLanguage(javax.faces.context.FacesContext, java.lang.String)
on the wrappedViewHandler
object.- Overrides:
getViewDeclarationLanguage
in classViewHandler
- Parameters:
context
- theFacesContext
for this request.viewId
- the logical view id, as returned fromViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, java.lang.String)
for which theViewDeclarationLanguage
should be returned.- Since:
- 2.0
-
initView
The default behavior of this method is to call
ViewHandler.initView(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.- Overrides:
initView
in classViewHandler
- Throws:
FacesException
- if a problem occurs setting the encoding, such as theUnsupportedEncodingException
thrown by the underlying Servlet or Portlet technology when the encoding is not supported.- Since:
- 1.2
- See Also:
-
renderView
public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException The default behavior of this method is to call
ViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
on the wrappedViewHandler
object.- Specified by:
renderView
in classViewHandler
- Parameters:
context
-FacesContext
for the current requestviewToRender
- the view to render- Throws:
IOException
- if an input/output error occursFacesException
- if a servlet error occurs- Since:
- 1.2
- See Also:
-
restoreView
The default behavior of this method is to call
ViewHandler.restoreView(javax.faces.context.FacesContext, String)
on the wrappedViewHandler
object.- Specified by:
restoreView
in classViewHandler
- Parameters:
context
-FacesContext
for the current requestviewId
- the view identifier for the current request- Since:
- 1.2
- See Also:
-
writeState
The default behavior of this method is to call
ViewHandler.writeState(javax.faces.context.FacesContext)
on the wrappedViewHandler
object.- Specified by:
writeState
in classViewHandler
- Parameters:
context
-FacesContext
for the current request- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
-