ViewHandlerWrapper (Java EE 5)

Java EE API


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

Extends: ViewHandler

提供 ViewHandler 的简单实现,开发人员可为其创建子类为现有 ViewHandler 实例提供专门行为。所有方法的默认实现是调用包装的 ViewHandler

用法:扩展此类并重写 #getWrapped,以返回正在包装的实例。

英文文档:

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
 
Constructor Summary
 
Method Summary
 String
 Locale
 String
 UIViewRoot
 String
 String
protected abstract  ViewHandler
 void
 void
 UIViewRoot
 void
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public ViewHandlerWrapper()
英文文档:

ViewHandlerWrapper

public ViewHandlerWrapper()
Method Detail

abstract protected ViewHandler getWrapped()
return 正在包装的实例。
英文文档:

getWrapped

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

public String calculateCharacterEncoding(FacesContext context)

此方法的默认行为是调用包装的 ViewHandler 对象上的 calculateCharacterEncoding(javax.faces.context.FacesContext)

since1.2
See also calculateCharacterEncoding(javax.faces.context.FacesContext)
英文文档:

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.

Overrides:
calculateCharacterEncoding in class ViewHandler
Since:
1.2
See Also:
ViewHandler.calculateCharacterEncoding(javax.faces.context.FacesContext)

public java.util.Locale calculateLocale(FacesContext context)

此方法的默认行为是调用包装的 ViewHandler 对象上的 calculateLocale(javax.faces.context.FacesContext)

since1.2
See also calculateLocale(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.

Specified by:
calculateLocale in class ViewHandler
Parameters:
context - FacesContext for the current request
Since:
1.2
See Also:
ViewHandler.calculateLocale(javax.faces.context.FacesContext)

public String calculateRenderKitId(FacesContext context)

此方法的默认行为是调用包装的 ViewHandler 对象上的 calculateRenderKitId(javax.faces.context.FacesContext)

since1.2
See also calculateRenderKitId(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.

Specified by:
calculateRenderKitId in class ViewHandler
Parameters:
context - FacesContext for the current request
Since:
1.2
See Also:
ViewHandler.calculateRenderKitId(javax.faces.context.FacesContext)

public UIViewRoot createView(FacesContext context, String viewId)

此方法的默认行为是调用包装的 ViewHandler 对象上的 createView(javax.faces.context.FacesContext, String)

since1.2
See also createView(javax.faces.context.FacesContext, String)
英文文档:

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.

Specified by:
createView in class ViewHandler
Since:
1.2
See Also:
ViewHandler.createView(javax.faces.context.FacesContext, String)

public String getActionURL(FacesContext context, String viewId)

此方法的默认行为是调用包装的 ViewHandler 对象上的 getActionURL(javax.faces.context.FacesContext, String)

since1.2
See also getActionURL(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.

Specified by:
getActionURL in class ViewHandler
Parameters:
context - FacesContext for this request
viewId - View identifier of the desired view
Since:
1.2
See Also:
ViewHandler.getActionURL(javax.faces.context.FacesContext, String)

public String getResourceURL(FacesContext context, String path)

此方法的默认行为是调用包装的 ViewHandler 对象上的 getResourceURL(javax.faces.context.FacesContext, String)

since1.2
See also getResourceURL(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.

Specified by:
getResourceURL in class ViewHandler
Parameters:
context - FacesContext for the current request
path - Resource path to convert to a URL
Since:
1.2
See Also:
ViewHandler.getResourceURL(javax.faces.context.FacesContext, String)

public void initView(FacesContext context) throws FacesException

此方法的默认行为是调用包装的 ViewHandler 对象上的 ViewHandler#initView

since1.2
See also initView
英文文档:

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.

Overrides:
initView in class ViewHandler
Throws:
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.
Since:
1.2
See Also:
ViewHandler.initView(javax.faces.context.FacesContext)

public void renderView(FacesContext context, UIViewRoot viewToRender) throws java.io.IOException, FacesException

此方法的默认行为是调用包装的 ViewHandler 对象上的 renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)

since1.2
See also renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
英文文档:

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.

Specified by:
renderView in class ViewHandler
Parameters:
context - FacesContext for the current request
viewToRender - the view to render
Throws:
IOException - if an input/output error occurs
FacesException - if a servlet error occurs
Since:
1.2
See Also:
ViewHandler.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)

public UIViewRoot restoreView(FacesContext context, String viewId)

此方法的默认行为是调用包装的 ViewHandler 对象上的 restoreView(javax.faces.context.FacesContext, String)

since1.2
See also restoreView(javax.faces.context.FacesContext, String)
英文文档:

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.

Specified by:
restoreView in class ViewHandler
Parameters:
context - FacesContext for the current request
viewId - the view identifier for the current request
Since:
1.2
See Also:
ViewHandler.restoreView(javax.faces.context.FacesContext, String)

public void writeState(FacesContext context) throws java.io.IOException

此方法的默认行为是调用包装的 ViewHandler 对象上的 writeState(javax.faces.context.FacesContext)

since1.2
See also writeState(javax.faces.context.FacesContext)
英文文档:

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.

Specified by:
writeState in class ViewHandler
Parameters:
context - FacesContext for the current request
Throws:
IOException - if an input/output error occurs
Since:
1.2
See Also:
ViewHandler.writeState(javax.faces.context.FacesContext)


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!