public abstract class ViewHandlerWrapper extends ViewHandler implements 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.
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 and Description |
---|
ViewHandlerWrapper() |
public abstract ViewHandler getWrapped()
FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
getWrapped
in interface FacesWrapper<ViewHandler>
public String calculateCharacterEncoding(FacesContext context)
The default behavior of this method is to
call ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)
on the wrapped ViewHandler
object.
calculateCharacterEncoding
in class ViewHandler
ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)
public Locale calculateLocale(FacesContext context)
The default behavior of this method is to
call ViewHandler.calculateLocale(javax.faces.context.FacesContext)
on the wrapped ViewHandler
object.
calculateLocale
in class ViewHandler
context
- FacesContext
for the current requestViewHandler.calculateLocale(javax.faces.context.FacesContext)
public String deriveViewId(FacesContext context, String input)
The default behavior of this method is to
call ViewHandler.deriveViewId(javax.faces.context.FacesContext, String)
on the wrapped ViewHandler
object.
deriveViewId
in class ViewHandler
context
- the FacesContext
for this requestinput
- the viewId
to derive,ViewHandler.deriveViewId(javax.faces.context.FacesContext, String)
public String deriveLogicalViewId(FacesContext context, String input)
The default behavior of this method is to
call ViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, String)
on the wrapped ViewHandler
object.
deriveLogicalViewId
in class ViewHandler
context
- the FacesContext
for this requestinput
- the viewId
to derive,ViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, String)
public String calculateRenderKitId(FacesContext context)
The default behavior of this method is to
call ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)
on the wrapped ViewHandler
object.
calculateRenderKitId
in class ViewHandler
context
- FacesContext
for the current requestViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)
public UIViewRoot createView(FacesContext context, String viewId)
The default behavior of this method is to
call ViewHandler.createView(javax.faces.context.FacesContext, String)
on the wrapped ViewHandler
object.
createView
in class ViewHandler
ViewHandler.createView(javax.faces.context.FacesContext, String)
public String getActionURL(FacesContext context, String viewId)
The default behavior of this method is to
call ViewHandler.getActionURL(javax.faces.context.FacesContext, String)
on the wrapped ViewHandler
object.
getActionURL
in class ViewHandler
context
- FacesContext
for this requestviewId
- View identifier of the desired viewViewHandler.getActionURL(javax.faces.context.FacesContext, String)
public Set<String> getProtectedViewsUnmodifiable()
The default behavior of this method is to
call ViewHandler.getProtectedViewsUnmodifiable()
on the wrapped ViewHandler
object.
getProtectedViewsUnmodifiable
in class ViewHandler
ViewHandler.getProtectedViewsUnmodifiable()
public void addProtectedView(String urlPattern)
The default behavior of this method is to
call ViewHandler.addProtectedView(java.lang.String)
on the wrapped ViewHandler
object.
addProtectedView
in class ViewHandler
urlPattern
- the url-pattern to add.ViewHandler.addProtectedView(java.lang.String)
public boolean removeProtectedView(String urlPattern)
The default behavior of this method is to
call ViewHandler.removeProtectedView(java.lang.String)
on the wrapped ViewHandler
object.
removeProtectedView
in class ViewHandler
urlPattern
- the url-pattern to remove.ViewHandler.removeProtectedView(java.lang.String)
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 wrapped ViewHandler
object.
getRedirectURL
in class ViewHandler
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 URLViewHandler.getRedirectURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
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 wrapped ViewHandler
object.
getBookmarkableURL
in class ViewHandler
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 URLViewHandler.getBookmarkableURL(javax.faces.context.FacesContext, String, java.util.Map, boolean)
public String getResourceURL(FacesContext context, String path)
The default behavior of this method is to
call ViewHandler.getResourceURL(javax.faces.context.FacesContext, String)
on the wrapped ViewHandler
object.
getResourceURL
in class ViewHandler
context
- FacesContext
for the current requestpath
- Resource path to convert to a URLViewHandler.getResourceURL(javax.faces.context.FacesContext, String)
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId)
The default behavior of this method is to
call ViewHandler.getViewDeclarationLanguage(javax.faces.context.FacesContext, java.lang.String)
on the wrapped ViewHandler
object.
getViewDeclarationLanguage
in class ViewHandler
context
- the FacesContext
for this request.viewId
- the logical view
id, as returned from ViewHandler.deriveLogicalViewId(javax.faces.context.FacesContext, java.lang.String)
for which the
ViewDeclarationLanguage
should be returned.public void initView(FacesContext context) throws FacesException
The default behavior of this method is to
call ViewHandler.initView(javax.faces.context.FacesContext)
on the wrapped ViewHandler
object.
initView
in class ViewHandler
FacesException
- 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.ViewHandler.initView(javax.faces.context.FacesContext)
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 wrapped ViewHandler
object.
renderView
in class ViewHandler
context
- FacesContext
for the current requestviewToRender
- the view to renderIOException
- if an input/output error occursFacesException
- if a servlet error occursViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
public UIViewRoot restoreView(FacesContext context, String viewId)
The default behavior of this method is to
call ViewHandler.restoreView(javax.faces.context.FacesContext, String)
on the wrapped ViewHandler
object.
restoreView
in class ViewHandler
context
- FacesContext
for the current requestviewId
- the view identifier for the current requestViewHandler.restoreView(javax.faces.context.FacesContext, String)
public void writeState(FacesContext context) throws IOException
The default behavior of this method is to
call ViewHandler.writeState(javax.faces.context.FacesContext)
on the wrapped ViewHandler
object.
writeState
in class ViewHandler
context
- FacesContext
for the current requestIOException
- if an input/output error occursViewHandler.writeState(javax.faces.context.FacesContext)
Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.