public abstract class ViewHandlerWrapper extends 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_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME
Constructor and Description |
---|
ViewHandlerWrapper() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
calculateCharacterEncoding(FacesContext context)
The default behavior of this method is to
call
ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)
on the wrapped ViewHandler object. |
java.util.Locale |
calculateLocale(FacesContext context)
The default behavior of this method is to
call
ViewHandler.calculateLocale(javax.faces.context.FacesContext)
on the wrapped ViewHandler object. |
java.lang.String |
calculateRenderKitId(FacesContext context)
The default behavior of this method is to
call
ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)
on the wrapped ViewHandler object. |
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 wrapped ViewHandler object. |
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 wrapped ViewHandler object. |
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 wrapped ViewHandler object. |
protected abstract ViewHandler |
getWrapped() |
void |
initView(FacesContext context)
The default behavior of this method is to
call
ViewHandler.initView(javax.faces.context.FacesContext)
on the wrapped ViewHandler object. |
void |
renderView(FacesContext context,
UIViewRoot viewToRender)
The default behavior of this method is to
call
ViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
on the wrapped ViewHandler object. |
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 wrapped ViewHandler object. |
void |
writeState(FacesContext context)
The default behavior of this method is to
call
ViewHandler.writeState(javax.faces.context.FacesContext)
on the wrapped ViewHandler object. |
protected abstract ViewHandler getWrapped()
public java.lang.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 java.util.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 java.lang.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, java.lang.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 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 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 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 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 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 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 wrapped ViewHandler
object.
renderView
in class ViewHandler
context
- FacesContext
for the current requestviewToRender
- the view to renderjava.io.IOException
- 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, java.lang.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 java.io.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 requestjava.io.IOException
- if an input/output error occursViewHandler.writeState(javax.faces.context.FacesContext)
Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.