|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.render Class RenderKitFactory
java.lang.Object javax.faces.render.RenderKitFactory
public abstract class RenderKitFactory
- extends Object
RenderKitFactory 是注册并返回 RenderKit
实例的工厂对象。JavaServer Faces 实现必须至少提供一个默认的 RenderKit
实现。高级实现(或外部第三方库)可能提供附加的 RenderKit
实现(以呈现工具包标识符作为键),用来对相同的组件执行不同类型的呈现。
每个利用 JavaServer Faces 的 Web 应用程序都必须有一个 RenderKitFactory
实例。可以通过可移植的方式获取此实例,即调用:
RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
RenderKitFactory is a factory object that registers
and returns RenderKit
instances. Implementations of
JavaServer Faces must provide at least a default implementation of
RenderKit
. Advanced implementations (or external third party
libraries) may provide additional RenderKit
implementations
(keyed by render kit identifiers) for performing different types of
rendering for the same components.
There must be one RenderKitFactory
instance per web
application that is utilizing JavaServer Faces. This instance can be
acquired, in a portable manner, by calling:
RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
Field Summary | |
---|---|
static String |
HTML_BASIC_RENDER_KIT
The render kit identifier of the default RenderKit instance
for this JavaServer Faces implementation. |
Constructor Summary | |
---|---|
RenderKitFactory()
|
Method Summary | |
---|---|
abstract void |
addRenderKit(String renderKitId,
RenderKit renderKit)
Register the specified RenderKit instance, associated with
the specified renderKitId , to be supported by this
RenderKitFactory , replacing any previously registered
RenderKit for this identifier. |
abstract RenderKit |
getRenderKit(FacesContext context,
String renderKitId)
Return a RenderKit instance for the specified render
kit identifier, possibly customized based on dynamic
characteristics of the specified FacesContext , if
non-null . |
abstract Iterator<String> |
getRenderKitIds()
Return an Iterator over the set of render kit
identifiers registered with this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
英文文档:
HTML_BASIC_RENDER_KIT
public static final String HTML_BASIC_RENDER_KIT
The render kit identifier of the default
RenderKit
instance for this JavaServer Faces implementation.- See Also:
- Constant Field Values
Constructor Detail |
---|
public
RenderKitFactory()
英文文档:
RenderKitFactory
public RenderKitFactory()
Method Detail |
---|
abstract public void
addRenderKit(String renderKitId, RenderKit renderKit)
注册此 RenderKitFactory
要支持的与指定 renderKitId
关联的指定 RenderKit
实例,同时替换之前为此标识符注册的任何 RenderKit
。
renderKitId |
要注册的 RenderKit 的标识符 |
renderKit |
要注册的 RenderKit 实例 |
Throws | NullPointerException:
如果 renderKitId 或 renderKit 为 null |
addRenderKit
public abstract void addRenderKit(String renderKitId, RenderKit renderKit)
Register the specified
RenderKit
instance, associated with the specifiedrenderKitId
, to be supported by thisRenderKitFactory
, replacing any previously registeredRenderKit
for this identifier.- Parameters:
renderKitId
- Identifier of theRenderKit
to registerrenderKit
-RenderKit
instance that we are registering- Throws:
NullPointerException
- ifrenderKitId
orrenderKit
isnull
abstract public RenderKit
getRenderKit(FacesContext context, String renderKitId)
为指定的呈现工具包标识符返回 RenderKit
实例,如果非 null
,则可能根据指定的 FacesContext
的动态特征进行了自定义。如果指定的标识符没有任何已注册 RenderKit
,则返回 null
。通过 getRenderKitIds()
方法可以获得一组可用的呈现工具包标识符。
context |
当前正在处理的请求的 FacesContext;如果不可用,则为 null 。 |
renderKitId |
请求的 RenderKit 实例的呈现工具包标识符 |
Throws | IllegalArgumentException:
如果对于指定的标识符没有任何可以返回的 RenderKit 实例 |
Throws | NullPointerException:
如果 renderKitId 为 null |
getRenderKit
public abstract RenderKit getRenderKit(FacesContext context, String renderKitId)
Return a
RenderKit
instance for the specified render kit identifier, possibly customized based on dynamic characteristics of the specifiedFacesContext
, if non-null
. If there is no registeredRenderKit
for the specified identifier, returnnull
. The set of available render kit identifiers is available via thegetRenderKitIds()
method.- Parameters:
context
- FacesContext for the request currently being processed, ornull
if none is available.renderKitId
- Render kit identifier of the requestedRenderKit
instance- Throws:
IllegalArgumentException
- if noRenderKit
instance can be returned for the specified identifierNullPointerException
- ifrenderKitId
isnull
abstract public java.util.Iterator<E>
getRenderKitIds()
返回一个对向此工厂注册的呈现工具包标识符集进行迭代的 Iterator
。此集合必须包括 RenderKitFactory.HTML_BASIC_RENDER_KIT
指定的值。
getRenderKitIds
public abstract Iterator<String> getRenderKitIds()
Return an
Iterator
over the set of render kit identifiers registered with this factory. This set must include the value specified byRenderKitFactory.HTML_BASIC_RENDER_KIT
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!