Class ViewHandlerWrapper
- java.lang.Object
-
- javax.faces.application.ViewHandler
-
- javax.faces.application.ViewHandlerWrapper
-
- All Implemented Interfaces:
FacesWrapper<ViewHandler>
public abstract class ViewHandlerWrapper extends ViewHandler implements FacesWrapper<ViewHandler>
Provides a simple implementation of
ViewHandlerthat can be subclassed by developers wishing to provide specialized behavior to an existingViewHandlerinstance. The default implementation of all methods is to call through to the wrappedViewHandler.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
Constructors Constructor Description ViewHandlerWrapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddProtectedView(java.lang.String urlPattern)The default behavior of this method is to callViewHandler.addProtectedView(java.lang.String)on the wrappedViewHandlerobject.java.lang.StringcalculateCharacterEncoding(FacesContext context)The default behavior of this method is to callViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.java.util.LocalecalculateLocale(FacesContext context)The default behavior of this method is to callViewHandler.calculateLocale(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.java.lang.StringcalculateRenderKitId(FacesContext context)The default behavior of this method is to callViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.UIViewRootcreateView(FacesContext context, java.lang.String viewId)The default behavior of this method is to callViewHandler.createView(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.java.lang.StringderiveLogicalViewId(FacesContext context, java.lang.String input)The default behavior of this method is to callViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.java.lang.StringderiveViewId(FacesContext context, java.lang.String input)The default behavior of this method is to callViewHandler.deriveViewId(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.java.lang.StringgetActionURL(FacesContext context, java.lang.String viewId)The default behavior of this method is to callViewHandler.getActionURL(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.java.lang.StringgetBookmarkableURL(FacesContext context, java.lang.String viewId, java.util.Map<java.lang.String,java.util.List<java.lang.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 wrappedViewHandlerobject.java.util.Set<java.lang.String>getProtectedViewsUnmodifiable()The default behavior of this method is to callViewHandler.getProtectedViewsUnmodifiable()on the wrappedViewHandlerobject.java.lang.StringgetRedirectURL(FacesContext context, java.lang.String viewId, java.util.Map<java.lang.String,java.util.List<java.lang.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 wrappedViewHandlerobject.java.lang.StringgetResourceURL(FacesContext context, java.lang.String path)The default behavior of this method is to callViewHandler.getResourceURL(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.ViewDeclarationLanguagegetViewDeclarationLanguage(FacesContext context, java.lang.String viewId)The default behavior of this method is to callViewHandler.getViewDeclarationLanguage(javax.faces.context.FacesContext, java.lang.String)on the wrappedViewHandlerobject.abstract ViewHandlergetWrapped()A class that implements this interface uses this method to return an instance of the class being wrapped.voidinitView(FacesContext context)The default behavior of this method is to callViewHandler.initView(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.booleanremoveProtectedView(java.lang.String urlPattern)The default behavior of this method is to callViewHandler.removeProtectedView(java.lang.String)on the wrappedViewHandlerobject.voidrenderView(FacesContext context, UIViewRoot viewToRender)The default behavior of this method is to callViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)on the wrappedViewHandlerobject.UIViewRootrestoreView(FacesContext context, java.lang.String viewId)The default behavior of this method is to callViewHandler.restoreView(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.voidwriteState(FacesContext context)The default behavior of this method is to callViewHandler.writeState(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.
-
-
-
Method Detail
-
getWrapped
public abstract ViewHandler getWrapped()
Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrappedin interfaceFacesWrapper<ViewHandler>- Returns:
- the instance that we are wrapping.
-
calculateCharacterEncoding
public java.lang.String calculateCharacterEncoding(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.- Overrides:
calculateCharacterEncodingin classViewHandler- Since:
- 1.2
- See Also:
ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)
-
calculateLocale
public java.util.Locale calculateLocale(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateLocale(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.- Specified by:
calculateLocalein classViewHandler- Parameters:
context-FacesContextfor the current request- Since:
- 1.2
- See Also:
ViewHandler.calculateLocale(javax.faces.context.FacesContext)
-
deriveViewId
public java.lang.String deriveViewId(FacesContext context, java.lang.String input)
The default behavior of this method is to call
ViewHandler.deriveViewId(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.- Overrides:
deriveViewIdin classViewHandler- Parameters:
context- theFacesContextfor this requestinput- theviewIdto derive,- Since:
- 2.0
- See Also:
ViewHandler.deriveViewId(javax.faces.context.FacesContext, String)
-
deriveLogicalViewId
public java.lang.String deriveLogicalViewId(FacesContext context, java.lang.String input)
The default behavior of this method is to call
ViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.- Overrides:
deriveLogicalViewIdin classViewHandler- Parameters:
context- theFacesContextfor this requestinput- theviewIdto derive,- Since:
- 2.1
- See Also:
ViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, String)
-
calculateRenderKitId
public java.lang.String calculateRenderKitId(FacesContext context)
The default behavior of this method is to call
ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.- Specified by:
calculateRenderKitIdin classViewHandler- Parameters:
context-FacesContextfor the current request- Since:
- 1.2
- See Also:
ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)
-
createView
public UIViewRoot createView(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.createView(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.- Specified by:
createViewin classViewHandler- Since:
- 1.2
- See Also:
ViewHandler.createView(javax.faces.context.FacesContext, String)
-
getActionURL
public java.lang.String getActionURL(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.getActionURL(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.- Specified by:
getActionURLin classViewHandler- Parameters:
context-FacesContextfor this requestviewId- View identifier of the desired view- Since:
- 1.2
- See Also:
ViewHandler.getActionURL(javax.faces.context.FacesContext, String)
-
getProtectedViewsUnmodifiable
public java.util.Set<java.lang.String> getProtectedViewsUnmodifiable()
The default behavior of this method is to call
ViewHandler.getProtectedViewsUnmodifiable()on the wrappedViewHandlerobject.- Overrides:
getProtectedViewsUnmodifiablein classViewHandler- Since:
- 2.2
- See Also:
ViewHandler.getProtectedViewsUnmodifiable()
-
addProtectedView
public void addProtectedView(java.lang.String urlPattern)
The default behavior of this method is to call
ViewHandler.addProtectedView(java.lang.String)on the wrappedViewHandlerobject.- Overrides:
addProtectedViewin classViewHandler- Parameters:
urlPattern- the url-pattern to add.- Since:
- 2.2
- See Also:
ViewHandler.addProtectedView(java.lang.String)
-
removeProtectedView
public boolean removeProtectedView(java.lang.String urlPattern)
The default behavior of this method is to call
ViewHandler.removeProtectedView(java.lang.String)on the wrappedViewHandlerobject.- Overrides:
removeProtectedViewin classViewHandler- Parameters:
urlPattern- the url-pattern to remove.- Since:
- 2.2
- See Also:
ViewHandler.removeProtectedView(java.lang.String)
-
getRedirectURL
public java.lang.String getRedirectURL(FacesContext context, java.lang.String viewId, java.util.Map<java.lang.String,java.util.List<java.lang.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 wrappedViewHandlerobject.- Overrides:
getRedirectURLin 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:
ViewHandler.getRedirectURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
-
getBookmarkableURL
public java.lang.String getBookmarkableURL(FacesContext context, java.lang.String viewId, java.util.Map<java.lang.String,java.util.List<java.lang.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 wrappedViewHandlerobject.- Overrides:
getBookmarkableURLin 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:
ViewHandler.getBookmarkableURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
-
getResourceURL
public java.lang.String getResourceURL(FacesContext context, java.lang.String path)
The default behavior of this method is to call
ViewHandler.getResourceURL(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.- Specified by:
getResourceURLin classViewHandler- Parameters:
context-FacesContextfor the current requestpath- Resource path to convert to a URL- Since:
- 1.2
- See Also:
ViewHandler.getResourceURL(javax.faces.context.FacesContext, String)
-
getViewDeclarationLanguage
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.getViewDeclarationLanguage(javax.faces.context.FacesContext, java.lang.String)on the wrappedViewHandlerobject.- Overrides:
getViewDeclarationLanguagein classViewHandler- Parameters:
context- theFacesContextfor this request.viewId- the logical view id, as returned fromViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, java.lang.String)for which theViewDeclarationLanguageshould be returned.- Since:
- 2.0
-
initView
public void initView(FacesContext context) throws FacesException
The default behavior of this method is to call
ViewHandler.initView(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.- Overrides:
initViewin classViewHandler- Throws:
FacesException- if a problem occurs setting the encoding, such as theUnsupportedEncodingExceptionthrown by the underlying Servlet or Portlet technology when the encoding is not supported.- Since:
- 1.2
- See Also:
ViewHandler.initView(javax.faces.context.FacesContext)
-
renderView
public void renderView(FacesContext context, UIViewRoot viewToRender) throws java.io.IOException, FacesException
The default behavior of this method is to call
ViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)on the wrappedViewHandlerobject.- Specified by:
renderViewin classViewHandler- Parameters:
context-FacesContextfor the current requestviewToRender- the view to render- Throws:
java.io.IOException- if an input/output error occursFacesException- if a servlet error occurs- Since:
- 1.2
- See Also:
ViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
-
restoreView
public UIViewRoot restoreView(FacesContext context, java.lang.String viewId)
The default behavior of this method is to call
ViewHandler.restoreView(javax.faces.context.FacesContext, String)on the wrappedViewHandlerobject.- Specified by:
restoreViewin classViewHandler- Parameters:
context-FacesContextfor the current requestviewId- the view identifier for the current request- Since:
- 1.2
- See Also:
ViewHandler.restoreView(javax.faces.context.FacesContext, String)
-
writeState
public void writeState(FacesContext context) throws java.io.IOException
The default behavior of this method is to call
ViewHandler.writeState(javax.faces.context.FacesContext)on the wrappedViewHandlerobject.- Specified by:
writeStatein classViewHandler- Parameters:
context-FacesContextfor the current request- Throws:
java.io.IOException- if an input/output error occurs- Since:
- 1.2
- See Also:
ViewHandler.writeState(javax.faces.context.FacesContext)
-
-