ViewHandlerWrapper (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.faces.application Class ViewHandlerWrapper

java.lang.Object
  extended by javax.faces.application.ViewHandler
      extended by javax.faces.application.ViewHandlerWrapper

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.

从以下版本开始:
1.2

字段摘要
 
Fields inherited from class javax.faces.application.ViewHandler
CHARACTER_ENCODING_KEY, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME
 
构造器摘要
ViewHandlerWrapper()
           
 
方法摘要
 String calculateCharacterEncoding(FacesContext context)
          The default behavior of this method is to call ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext) on the wrapped ViewHandler object.
 Locale calculateLocale(FacesContext context)
          The default behavior of this method is to call ViewHandler.calculateLocale(javax.faces.context.FacesContext) on the wrapped ViewHandler object.
 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, String viewId)
          The default behavior of this method is to call ViewHandler.createView(javax.faces.context.FacesContext, String) on the wrapped ViewHandler object.
 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.
 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.
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, 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.
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造器详细信息

ViewHandlerWrapper

public ViewHandlerWrapper()
方法详细信息

getWrapped

protected abstract ViewHandler getWrapped()
返回:
the instance that we are wrapping.

calculateCharacterEncoding

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
从以下版本开始:
1.2
另请参见:
ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)

calculateLocale

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 request
从以下版本开始:
1.2
另请参见:
ViewHandler.calculateLocale(javax.faces.context.FacesContext)

calculateRenderKitId

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 request
从以下版本开始:
1.2
另请参见:
ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)

createView

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
从以下版本开始:
1.2
另请参见:
ViewHandler.createView(javax.faces.context.FacesContext, String)

getActionURL

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 request
viewId - View identifier of the desired view
从以下版本开始:
1.2
另请参见:
ViewHandler.getActionURL(javax.faces.context.FacesContext, String)

getResourceURL

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 request
path - Resource path to convert to a URL
从以下版本开始:
1.2
另请参见:
ViewHandler.getResourceURL(javax.faces.context.FacesContext, String)

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 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.
从以下版本开始:
1.2
另请参见:
ViewHandler.initView(javax.faces.context.FacesContext)

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 wrapped ViewHandler object.

规范说明:
renderView in class ViewHandler
参数:
context - FacesContext for the current request
viewToRender - the view to render
抛出异常:
IOException - if an input/output error occurs
FacesException - if a servlet error occurs
从以下版本开始:
1.2
另请参见:
ViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)

restoreView

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 request
viewId - the view identifier for the current request
从以下版本开始:
1.2
另请参见:
ViewHandler.restoreView(javax.faces.context.FacesContext, String)

writeState

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 request
抛出异常:
IOException - if an input/output error occurs
从以下版本开始:
1.2
另请参见:
ViewHandler.writeState(javax.faces.context.FacesContext)

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.